Check box checked status

If GetValue returns a true of false value why won't this code
work.Neither example returns a positive even when the box is checked.

    if (FRcb1.GetValue()):
        arraydata[6,1]=1

    if FRcb1.GetValue():
        arraydata[6,1]=1

Mike,

This works for me with checkboxes:
                if checkBox.GetValue() == True:
                    setattr(newAttr, comp, 'Y')
                else:
                    setattr(newAttr, comp, 'N')

Should really be equivalent to your second example, so had to quickly test it and for me this works too setting up a checkbox and doing the following in the EVT_CHECKBOX handler.:

if self.checkBox.GetValue():
            print 'Yes'
        else:
            print 'No'

See you
Werner

Mike Wagman wrote:

···

If GetValue returns a true of false value why won't this code
work.Neither example returns a positive even when the box is checked.

   if (FRcb1.GetValue()):
       arraydata[6,1]=1

   if FRcb1.GetValue():
       arraydata[6,1]=1

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org