En Wed, 01 Apr 2009 21:55:52 -0300, Muddy Coder <cosmo_gene...@yahoo.com> escribió:

I have a problem of handling Toplevel window. Basically, I wrote a
listbox viewer with scrollbars, and saved in file listbo.py. 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
code:

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

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

shouldn't the last line be ScrolledList(alist,new)?

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to