Is it possible to capture mouse events such as wx.EVT_LEFT_DOWN in a
Static Box or a widget that is not enabled?
I’m not sure what you mean by a Static Box, but disabled widgets don’t respond to mouse events…at least, not that I’ve seen. You might be able to use the mouse events from the widget’s parent to detect where the user clicked and if they clicked in the position of a disabled widget, then you could respond somehow.
···
On Fri, Jan 7, 2011 at 5:58 PM, bruce g bruceg113355@gmail.com wrote:
Is it possible to capture mouse events such as wx.EVT_LEFT_DOWN in a
Static Box or a widget that is not enabled?
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
–
Mike Driscoll
By Static Box I mean wx.StaticBox. Is it possible to capture the wx.EVT_LEFT_DOWN event?
I can capture the wx.EVT_LEFT_DOWN event for wx.StaticText so why not for wx.StaticBox?
As for a disabled widget, your suggestion will work. I guess I can apply this approach to a wx.StaticBox.
Bruce
···
On Fri, Jan 7, 2011 at 10:06 PM, Mike Driscoll mike@pythonlibrary.org wrote:
On Fri, Jan 7, 2011 at 5:58 PM, bruce g bruceg113355@gmail.com wrote:
Is it possible to capture mouse events such as wx.EVT_LEFT_DOWN in a
Static Box or a widget that is not enabled?
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
I’m not sure what you mean by a Static Box, but disabled widgets don’t respond to mouse events…at least, not that I’ve seen. You might be able to use the mouse events from the widget’s parent to detect where the user clicked and if they clicked in the position of a disabled widget, then you could respond somehow.
–
Mike Driscoll
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
Mouse events for static controls are hit and miss and will vary by platform. Since the widgets are intended to be view-only and not interacting with the user wx doesn't try to enforce consistency across platforms with the mouse events.
···
On 1/8/11 5:23 AM, bruce g wrote:
By Static Box I mean wx.StaticBox. Is it possible to capture the
wx.EVT_LEFT_DOWN event?
I can capture the wx.EVT_LEFT_DOWN event for wx.StaticText so why not
for wx.StaticBox?
--
Robin Dunn
Software Craftsman