Chris Mellon wrote:
This is caused by a mismatch in the __init__ signature between the
GenButton and GenBitmapButton. I should have caught this in my
testing, sorry.
Attached is an updated version that uses a mixin instead so it doesn't
change the signature. Please let me know if it works for you.Now it runs, and buttons do have yellow edges when I click on them
(OnMouseDown, I checked and indeed they didn't do that before) - but still
they don't show yellow edges when mouse is over the button (OnMouseOver).We are getting somewhere
Thanks again for your help!
IgorThis is actually trickier than I thought because you need to mix in
the mouse over functionality, without breaking the different type
signatures. I was trying to be minimally invasive in the buttons.py
module.Robin: Would you prefer that I redo all the classes so they're
new-style and fix up the signatures as best as I can, or take a cheap
and easy way out and just add the the refresh on mouse enter/leave to
the base class?
How about this:
* Give GenButton an empty InitOtherEvents method, and call it from the __init__ right after all the other events are bound.
* Give the ThemedGenButton class an implementation for InitOtherEvents that binds the mouse-enter and mouse-leave event handlers.
* Remove the ThemedGenButton.__init__ so it will be __init__-less like before.
This should solve this problem and will also give a hook for future enhancements that need to have specific events handled.
ยทยทยท
On 8/25/07, Igor Jese <igor@jeseonline.com> wrote:
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!