wxMenuItem.IsChecked

David Montgomery davidlmontgomery at gmail.com
Wed Aug 1 18:59:57 PDT 2007


Hi,

In my handler for a wx.ITEM_CHECK menu item,
I'm looking up the menu item and calling item.IsChecked.
My intent was to use the returned value as an indication
of whether the checked item was just turned on, or just
turned off.

What I see, however, is that item.IsChecked is always
returning False.

(The menu item itself does toggle between showing and not
showing a check.)

Is this expected behavior?  Is there some other recommended
way to get whether the item is becoming checked or
unchecked?

For now I'll add an additional boolean to track it, but I
was hoping to avoid the duplication of data, so that it
would be impossible for the two to become out of sync.

Thanks much,
David




More information about the wxpython-users mailing list