"bob smith" <bobsmith...@hotmail.com> wrote
So, here's another simple example where all of the radio buttons
start out incorrectly selected:
v = StringVar()
Radiobutton(root, text = "Test RadioButton 1", variable=v,
value="1").grid(row = 0, column = 0, sticky = W)
Radiobutton(root, text = "Test RadioButton 2", variable=v,
value="2").grid(row = 1, column = 0, sticky = W)
root.mainloop()
Any ideas on how to have a StringVar() associated with a
group of Radiobutton objects where all of the radio buttons start off
unselected?
Don't you need to assign a value to the StringVar? Othewise how does Python
know which of your buttons is supposed to be the selected option?
But I'm no expert, I rarely use radio buttons...
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor