Optionmenu.

Thor thor__00 at yahoo.com
Wed Sep 3 23:03:24 EDT 2003


I have the following function (with some things removed):

def add_stock():    
    stockw=Tk()
    stockw.title("New stock solution")
    sofl=Frame(stockw)
    sofl.pack()
    u=StringVar()
    u.set("M")
    cw=OptionMenu(sofl,u,"M","m","u","v","w")
    cw.grid(row=1,column=2)

but the widget keeps not showing teh selected option. If I fo the same out
of the function it works without problem (with stockw.mainloop()). What am
I missing? Anybody can point me out to the solution/the right webpage?
-- 
Thor -- Stockholm -- Sverige




More information about the Python-list mailing list