[wxPython] CaptureMouse() on StaticText and TextCtrls

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] CaptureMouse() on StaticText and TextCtrls

andy-224
wxGtk 2.1.10
wxPython 2.1.5

Calling CaptureMouse() on wxStaticText or wxTextCtrl objects results in no
more mouse events being passed to these objects.  I basically have an
object that inherits from wxStaticText - when I get a dragging mouse event,
I call CaptureMouse() on the object, and after this I receive no more
Mouse events (dragging, button up, button down).  On a wxButton this works
fine, but not on the wxStaticText or the wxTextCtrl.

                 &y

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] CaptureMouse() on StaticText and TextCtrls

Robin Dunn
>
> Calling CaptureMouse() on wxStaticText or wxTextCtrl objects results in no
> more mouse events being passed to these objects.  I basically have an
> object that inherits from wxStaticText - when I get a dragging mouse
event,
> I call CaptureMouse() on the object, and after this I receive no more
> Mouse events (dragging, button up, button down).  On a wxButton this works
> fine, but not on the wxStaticText or the wxTextCtrl.
>

Robert says it is because wxStaticText is not really a window, and is just
drawn on its parent, (which I can understand,) and wxTextCtrl has a window
"but it is different from the standard one"  (which I'm not sure I
follow...)

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users