tab order for Tkinter widgets

Laura Creighton lac at strakt.com
Mon Feb 18 08:44:57 EST 2002


I thought that the order in which you tabbed through widgets was the
order in which you gridded them (assuming you are using the grid manager).
I have a bunch of widgets that know what row and what column they are
to be gridded in, but I cannot guarantee what order I can get them out
of the database.

So in the middle of a loop I have:

	decorated.append((d['managerArgs']['row'],
                          d['managerArgs']['column'],
                          d['managerArgs'], widget ))

then at the bottom I can do

        decorated.sort()
        for junk, junk, args, widget in unordered:
            widget.grid(args)

They are all gridding nicely.  The sort works great as well.  And
tabbing gets you randomly flopping from one entry field to another
same as always.  Clearly there is something else I need to do to get
my widgets to tab in the correct order.  What?

Thanks very much,
Laura Creighton




More information about the Python-list mailing list