Thanks for the code-let. I agree, normally you would know, unless, for example, you are processing a container widget thats been populated by the user.
On Fri, Jan 23, 2009 at 1:53 AM, Gisle Aas <gi...@activestate.com> wrote: > On Jan 23, 2009, at 5:26 , E.R. Uber wrote: > > When traversing the list of child widgets returned from g_winfo_children, >> how does one distinguish what type of widget is being examined? For >> instance, if you only care about frame and ttk::frame widgets and nothing >> else. >> > > Usually you would just know based on the name (path) of the widget I would > guess, but there are other winfo subcommands[1] that might come handy. You > might for instance try something like: > > if ($w->g_winfo_class =~ /^T?Frame$/) { > # do something with frame and ttk::frame widgets > ... > } > > --Gisle > > > > [1] http://www.tcl.tk/man/tcl8.5/TkCmd/winfo.htm >