Im making a list of addresses that the user will select from, and the address text will be returned. I need to use Tkinter.Label
because the Tkinter.Listbox
will not allow for newlines.
The kicker is there is no .get()
-like method in the Label class...
I know I can do something like:
v = StringVar()
Label(master, textvariable=v).pack()
v.set("New Text!")
...
print v.get()
However, I have a list of 5-20 address' keeping a seperate array of StringVar()
's will be difficult b/c I have no way of identifying the loc of the active label. I would like to just access the activated widget contents.
Is Tkinter.Label
the right widget to be using?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…