Hi all. I'm trying to find out if an object is a descendant of wxControl by
the following:
if isinstance(obj, wxControl):
However, it always returns 0. I suspect this has something to do with
the proxy-object stuff that is happening at the Python layer. Anyone
know a way to make this type of check work?
···
-------------------------------------------------------------------------------------
Jeff Kotula Systems Architecture Manager
Vital Images jkotula@vitalimages.com
Renunciation is not giving up the things of this world,
but accepting that they go away.
-- Suzuki Roshi
I want to be able to catch motion events in a parent component - specifically I'm containing a StaticBitmap in a Panel, which adds more functionality. I thought I could do this:
Hi all. I'm trying to find out if an object is a descendant of wxControl by
the following:
if isinstance(obj, wxControl):
However, it always returns 0. I suspect this has something to do with
the proxy-object stuff that is happening at the Python layer. Anyone
know a way to make this type of check work?
Look at the class definitions and you'll see that the shadow classes for the controls derive from the wxControlPtr shadow class, not wxControl. (It's just the this version of SWIG works...)
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I want to be able to catch motion events in a parent component - specifically I'm containing a StaticBitmap in a Panel, which adds more functionality. I thought I could do this:
You'll need to catch the events you are interested in using the normal EVT_ mechanism and then you can pass them on to the parent if that's what you need to do. Also, you should do it like this: