ActiveX event question..

Hi.. I'm using different ActiveX controls in my python code, and I see how to get the ActiveX controls events, but I'm having problems processing Mouse events on my different controls, I can't find a way to do so.. The example is a small window using a activex control to show pictures or video, when the user clicks on the control, i want to process that mouse event.. I've tried the normal ways of handling this and the event is not triggered. Is there a trick to using mouse events with ActiveX controls?

Thanks for any help

Gary

Gary MacDonald wrote:

Hi.. I'm using different ActiveX controls in my python code, and I
see how to get the ActiveX controls events, but I'm having problems
processing Mouse events on my different controls, I can't find a way
to do so.. The example is a small window using a activex control to
show pictures or video, when the user clicks on the control, i want
to process that mouse event.. I've tried the normal ways of handling
this and the event is not triggered. Is there a trick to using mouse
events with ActiveX controls?

The current ActiveXWrapper is kind of a hack and we really need a better implementation but I don't currently have the time (or knowledge of win32com and such) to do it. Currently the wxWindow class that is created by the wrapper is used as the _parent_ of the actual ActiveX control, not the AX control itself. So when you bind mouse, key, etc. event handlers to that window they will never get sent because that wxWindow never gets them, the AX control does.

If somebody wants to revamp the activexwrapper.py module feel free, otherwise there is a new version of the wxActiveX contrib that looks like it is now flexible enough that we can do stuff dynamically at runtime (rather than C++ compile time) for wrapping new types of AX controls on the fly. I'll eventually get the new wxActiveX stuff added to wxPython, but if somebody else wants to give it a try please do. Just ask me (privately or on the wxPython-dev list) what my wishes for it are...

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!