There are lots more. So far only the basic fundamental types are
supported. Since that C++ ActiveX wrapper implementation has suffered
some bit-rot and not been maintained very well I added a new Python-only
activex module that uses ctypes and comtypes to provide a much more
full-featured implementation. See the wx.lib.activex module, and also
wx.lib.iewin and wx.lib.pdfwin for some examples of using the activex
module.
--
Robin Dunn
Software Craftsmanhttp://wxPython.org
I tried this but I have a different error now :
Traceback (most recent call last):
File "newaxtest.py", line 24, in <module>
ax=AXclass(fr,clstr,size=wx.Size(640,480))
File "newaxtest.py", line 11, in __init__
ActiveXCtrl.__init__(self,self.Frame,axid,**kwargs)
File "C:\python25\lib\site-packages\wx-2.8-msw-unicode\wx\lib
\activex.py",
line 112, in__init__
self.AddEventSink(self)
File "C:\python25\lib\site-packages\wx-2.8-msw-unicode\wx\lib
\activex.py",
line 134, in AddEventSink
self._evt_connections.append(cc.GetEvents(self._ax, sink,
interface))
File "C:\python25\lib\site-packages\comtypes\client\_events.py",
line 132, in
GetEvents
interface = FindOutgoingInterface(source)
File "C:\python25\lib\site-packages\comtypes\client\_events.py",
line 72, in FindOutgoingInterface
raise TypeError("cannot determine source interface")
TypeError: cannot determine source interface
···
-----------------------------------------------------
The code looks like this:
import os
import wx
from wx.lib.activex import *
clstr ='{5B72F398-1C3D-4455-89E3-60081FD10090}'
class AXclass(ActiveXCtrl):
def __init__(self, parent,axid,**kwargs):
self.Frame=parent
ActiveXCtrl.__init__(self,self.Frame,axid,**kwargs)
self.Source_Mode=2 # this is one of the properties of the
control
# Stuff to do when we exit:
def OnClose(self, event):
print "deleting"
print "exiting"
os._exit(1)
app = wx.App(redirect=0)
fr=wx.Frame(None)
ax=AXclass(fr,clstr,size=wx.Size(640,480))
app.MainLoop()