Tkinter problems
Isaac To Kar Keung
kkto at csis.hku.hk
Wed May 23 11:32:30 EDT 2001
>>>>> "Christian" == Christian Maus <maus at netz.klinik.uni-mainz.de> writes:
Christian> In one of these childwindows I put a button which calls a
Christian> method to create a new frame in the childwindow. Instead of
Christian> creating a new frame in this childwindow, containing a label
Christian> and an entry, it is created in my mainwindow. When I insert a
Christian> label directly into the window, instead of a new frame the
Christian> label is created in the childwindow just as I intended.
Probably because you didn't tell Tkinter that you want to create the
subwindow with the window as the parent. Remember that Tkinter has no idea
about *your* class hierarchy. It has *its own* idea about the parent-child
relationships among the widgets. So be sure to create a widget like
self.mylabel = Label(self.mytoplevel, option1=value1, ...)
Regards,
Isaac.
More information about the Python-list
mailing list