win98se, wxPython 2.1.14
I was wondering how I could fool the system into believing a EVT_LEFT_UP
happened.
If I have a canvas with a panel on top of it, and I press the left mouse
button when on the panel, I send CaptureMouse() to the canvas in my
EVT_LEFT_DOWN handler. When I lift the button up again, in my EVT_LEFT_UP
handler, my GetEventObject() is the canvas because of the capture mouse, but
I really want it to be the panel, since that's what's underneath my cursor.
I was assuming that I should send ReleaseMouse() to the canvas and process
another EVT_LEFT_UP without touching the mouse, then the event object should
be the panel. Am I correct in assuming this? If so, how do I make the left
up happen.
TIA,
Robin.
_______________________________________________
wxPython-users maillist - wxPytho...@starship.python.net
http://starship.python.net/mailman/listinfo/wxpython-users
Why CaptureMouse on the canvas and not the Panel? If you want the panel to
get the events, then it should be the one that does the capture and release.
> I was assuming that I should send ReleaseMouse() to the canvas and process
> another EVT_LEFT_UP without touching the mouse, then the event object
should
> be the panel. Am I correct in assuming this? If so, how do I make the left
> up happen.
>
You will probably have to resend the event. Change the appropriate values in
the event object, then call panel.GetEventHandler().ProcessEvent(event)
--
Robin Dunn
Software Craftsman
ro...@AllDunn.com
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/ Check it out!