Chris Jones | 20 Aug 10:51

Manually setting wxAddCheckTool state possible?

Sorry if this is covered elsewhere, I searched documentation and google in vain for considerable time.

I am using a wxAddCheckTool toggle icon on my toolbar.  I would like to update its toggled state from another part of the code.  Is there any way to manually change its toggled state?  For example:

self.toggle = self.toolbar.AddCheckTool(self.ID_TOGGLE, icons.getTaggedBitmap())
self.frame.Bind(wx.EVT_TOOL, self.on_toolbar_toggle, self.toggle)

How can I manually change the self.toggle object to update its state?  The only promising-looking method was SetToggle, but this appears to change the ability to toggle it, not its actual state.

Is it just impossible? :/  I would accept workarounds such as manually firing events where such a state is mutable, if necessary.


--
Chris
_______________________________________________
wxpython-users mailing list
wxpython-users <at> lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Gmane