Tkinter question

Ali El Dada eldada at mdstud.chalmers.se
Fri Nov 28 13:59:23 EST 2003


hi all:

i am using Tkinter in my application, and i have a button
that, when clicked, opens a new window as in: 

b1 = Button(someframe, text="bla", command = someFunction)

def someFunction():
    newWindow = Toplevel()
    '''the new window widgets go here'''

of course, whenever the button is clicked, a new window
opens. what do you recommend as a neat way to allow only one
window to open?? is it a good idea to use classes and making
the new window a member of the first? will it solve the
problem? 

thanks...




More information about the Python-list mailing list