Hi,
I have created a checkbutton within a dialog box. But, I am not able to capture the value of the checkbutton. The value always seems to be 0 whether checked or not.
class MyDialog:
def __init__(self,parent):
self.Frame1= Tix.Frame(parent)
self.Frame1.pack(side=Tix.LEFT, fill=Tix.BOTH)
self.enabled = Tix.IntVar()
self.checkbutton = Tix.Checkbutton(self.Frame1,text = "Enable Email Option", variable=self.enabled,command=self.OnCheckBoxClick)
self.checkbutton.pack(side=Tix.TOP)
def OnCheckBoxClick(self):
iTemp = self.enabled.get()
print "iTemp %s"%iTemp
Can you tell me whats wrong with the code?
Thanks!