Event not playing right
I have created a checkbox:
#Add a Checkbox to determine whether or not to loop through input file
self.Reiterate = wx.CheckBox(self, -1, label='Reiterate through input file?')
wx.EVT_CHECKBOX(self, -1, self.UpdateLooping)
I want to get the status from it, and set a variable, but for some reason, it isn’t working.
def UpdateLooping(self,event):
print "Got here."
if event.IsChecked == wx.FALSE:
STOP_READ = wx.TRUE
print "STOP_READ set to TRUE"
elif event.IsChecked == wx.TRUE:
STOP_READ = wx.FALSE
print "STOP_READ set to FALSE"
I get the “Got here.” with no problem, but the status of the Checkbox isn’t coming through and I’m not getting into the if statement regardless of whether or not the box is checked. I have done similar things with other widgets with no problem. What am I doing wrong here?
Vicki Stanfield
3S Confidence Meter Project
“A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty.”
– Winston Churchill