Tk itself imposes no such limits at all (though you could have problems if you end up using very large amounts of memory).
The underlying graphics layer might impose limits, I suppose, but I've never encountered them. (Note that from the perspective of that layer, it is only the path within a toplevel that counts.) I guess it's more likely that you'll create an unworkable mess and impractical GUI long before you hit any limits that exist; I tend to try to keep the level of nesting fairly small; using grid
rather than pack
helps in this, as does making interaction widgets direct children of the toplevel and using the -in
option to the geometry managers to set things up right. In fact, I think the only thing that must be correct in terms of parent/child relationships with widgets is where you need the clipping; in Tk, children are clipped by their parents. (This matters if you're using a text
or canvas
to do different types of scrollable areas, or — IIRC — when using ttk::notebook
to overlay several widgets on the one area.)
Summary: Worry about other problems first, OK?