the second of nested buttons using textvariable remains void!

2007-03-21 Thread Samkos
Hi there,

I am fighting with a problem I intended to  believe trivial that
I could not solve yet!

I am trying to have a button with a variable text, that
pops up another button with a variable text when pressed.

I did that with the following program  in Python, but the
second button remains always void!!! is it related to
the textvariable parameters?

If any of you had a clue, please  don't hesitate!

in advance, many thanks

Samuel

#--- program 2 buttons.py
--

from Tkinter import *


def go(event):
root = Tk()

s1=StringVar()
s1.set("s1")
label1 = Label(root, textvariable=s1)
label1.pack(side=LEFT)

root.mainloop()



root = Tk()

s0=StringVar()
s0.set("s0")
label0 = Label(root, textvariable=s0)
label0.pack(side=LEFT)


root.bind("",go)

root.mainloop()

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


Re: the second of nested buttons using textvariable remains void!

2007-03-26 Thread Samkos
Thanks a lot Jim and James

now it works fine!

Sam

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