Getting every child widget of a Tkinter window

The method you are looking for is winfo_children.

Recursive like this:

def all_children(wid, finList=None, indent=0):
    finList = finList or []
    print(f"{'   ' * indent}{wid=}")
    children = wid.winfo_children()
    for item in children:
        finList.append(item)
        all_children(item, finList, indent + 1)
    return finList

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)