I have the following function (with some things removed):
def add_stock():
stockw=Tk()
stockw.title("N ew stock solution")
sofl=Frame(stoc kw)
sofl.pack()
u=StringVar()
u.set("M")
cw=OptionMenu(s ofl,u,"M","m"," u","v","w")
cw.grid(row=1,c olumn=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
def add_stock():
stockw=Tk()
stockw.title("N ew stock solution")
sofl=Frame(stoc kw)
sofl.pack()
u=StringVar()
u.set("M")
cw=OptionMenu(s ofl,u,"M","m"," u","v","w")
cw.grid(row=1,c olumn=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
Comment