Help for Toplevel

Muddy Coder cosmo_general at
Thu Apr 2 02:55:52 CEST 2009

Hi Folks,

I have a problem of handling Toplevel window. Basically, I wrote a
listbox viewer with scrollbars, and saved in file Then in
my main GUI window, with menu, I need to launch the listbox viewer, in
a new window. Obviously, a Toplevel window is needed. But, I failed at
passing parameters over to Toplevel window. Please take a look at my

Listbox viewer:
class ScrolledList(Frame):
	def __init__(self, options, parent=None):
		Frame.__init__(self, parent)
		self.pack(expand=YES, fill=BOTH)

In my main GUI:
from XXX import ScrolledList
class Foo:
     def __init__(self):
     def call_listbox(self, params):
           new = Toplevel()
           alist = ['foor','bar']

With the code above, the widgets did not show on the Toplevel window,
and the data list ['foo','bar'] did not show up either. Can somebody
help me on it? Thanks a lot!

Muddy Coder

More information about the Python-list mailing list