Skip to content

[Question]How to remove a specific widget from a looped ListView #3689

Answered by ndonkoHenri
AthenaRoland asked this question in Q&A
Discussion options

You must be logged in to vote

Try this:

    def close(e, view, path, page):
        def f(f):
            removejson(path="./datas/settings.json", value=path, subject="indexfolder")
            container = f.control.parent.parent # https://python.plainenglish.io/access-any-controls-parent-flet-98e2c60dfab8
            container.parent.controls.remove(container)
            f.page.update()
        return f

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AthenaRoland
Comment options

Answer selected by AthenaRoland
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
2 participants