jym wrote:
Hello
I am working on an application that needs a button to work similarly to a push to talk Ham or CB radio microphone button. This is I need a button down event (mic on) and a button up event (mic off). I could not find how wxPython would support such events. Does anyone know of such events or have a suggested work around.
The native button widget doesn’t support any special notifications like this, but you can probably do it by intercepting the low level mouse up and down events yourself. Just be sure to call event.Skip from your handlers so the default event handlers in the button widget still get a chance to run. You might also want to try one of the button classes in wx.lib.buttons as that will give you a bit more control over it.
I put in EVT_LEFT_DOWN/EVT_LEFT_UP event handlers relative to the button and things are working great.
Thanks
jym
···
On Mon, Apr 14, 2008 at 11:28 AM, Robin Dunn robin@alldunn.com wrote:
–
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
wxpython-users mailing list