Hello,

"You can even use a StringVar as the checkbutton's variable, and supply string values for the
offvalue and onvalue. Here's an example:
self.spamVar = StringVar()
self.spamCB = Checkbutton ( self, text="Spam?",
variable=self.spamVar, onvalue="yes", offvalue="no" )
If this checkbutton is on, self.spamVar.get() will return the string "yes"; if the checkbutton is off, that same call will return the string "no". Furthermore, your program can turn the checkbutton
on by calling .set("yes")."

Regards
Karim



On 01/12/2011 05:55 PM, Stinson, Wynn A Civ USAF AFMC 556 SMXS/MXDED wrote:

Can someone give me some sample code to use to determine if a checkbox has been selected using Tkinter? thanks


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to