I looked some more into the problem. It seems related to the EVT_BUTTON event
and the event.Skip() but i still can't put my finger on the problem since the
behaviour it does not seem consistent with my code changes.
I wrote code that calls a methon when the putton is first pressed, then released
and also another method when you right click on it. The button has a tooltip.
Questions:
1) Must a button always have a handler for EVT_BUTTON if it has handlers for
EVT_LEFT_DOWN and EVT_LEFT_UP (and EVT_RIGHT_DOWN)?
2) About event.Skip(). From my readings, you call event.Skip() inside the
handler, to let the event be processed by the base wxWindow or the native
control. So it would seem that you should call event.Skip() for every button
handler. Is this the case? The wxButton demo code does not call Skip() for the
button event. I'm a little confused here.
Thanks for the help!
Pierre
Pierre_Rouleau@ImpathNetworks.com on 05/28/2003 06:14:38 PM
Please respond to wxPython-users@lists.wxwindows.org
over?
I am just starting with wxPython but already made a complete app in less than a
week. wxPython is *great*.
Thanks for the all the people that designed it and contribute!!
Question:
Is there any attribute to a wxButton or wxBitmapButton that can affect the
button behaviour and prevent it to look "pushed in" when the user left click on
it?
My app had button from day one and they looked fine. Then just today I realized
that the buttons dont push down anymore. The events are generated and the
methods are called, but the screen representation of the button does not change
when the user "presses" on the button.
I added a 'new' button to my app, and the new button works fine. Any idea?
I am using: wxPython 2.4.0.7, Python 2.2. Tried the app on Windows NT 4 SP6,
Windows 2000.
Many thanks,
Pierre
···
To: wxPython-users@lists.wxwindows.org
cc: (bcc: Pierre Rouleau/impath)
Subject: [wxPython-users] Why does a button does look pressed when clicked
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org