[wxPython-users] Read Only wx.CheckBox

Mark Erbaugh mark at microenh.com
Sun Nov 4 12:24:21 PST 2007


On Sat, 2007-11-03 at 23:06 -0500, Cody Precord wrote:
> No I don' t think so, but you can bind to EVT_CHECKBOX and prevent  
> the check box from changing its value in the event handler to get  
> this behavior.

It doesn't look like trapping and not propagating the EVT_CHECKBOX has
any effect. I did have some success by trapping both EVT_LEFT_DOWN (for
a mouse click) and EVT_KEY_DOWN (and for hitting the space bar with the
checkbox focuesd) events.  However, if the checkbox is set up to respond
to an accelerator key press (i.e. Alt-I  as in &Inactive), that still
causes the state of the checkbox to change.

Mark





More information about the wxpython-users mailing list