Some minor tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -89,12 +89,13 @@ def MakeActiveXClass(CoClass, eventClass=None, eventObj=None):
|
|||||||
|
|
||||||
|
|
||||||
# These functions will be used as methods in the new class
|
# These functions will be used as methods in the new class
|
||||||
def axw__init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0):
|
def axw__init__(self, parent, ID=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0):
|
||||||
|
|
||||||
# init base classes
|
# init base classes
|
||||||
pywin.mfc.activex.Control.__init__(self)
|
pywin.mfc.activex.Control.__init__(self)
|
||||||
wx.Window.__init__( self, parent, -1, pos, size, style|wx.NO_FULL_REPAINT_ON_RESIZE)
|
wx.Window.__init__( self, parent, -1, pos, size, style|wx.NO_FULL_REPAINT_ON_RESIZE)
|
||||||
|
self.this.own(False) # this should be set in wx.Window.__init__ when it calls _setOORInfo, but...
|
||||||
|
|
||||||
win32ui.EnableControlContainer()
|
win32ui.EnableControlContainer()
|
||||||
self._eventObj = self._eventObj # move from class to instance
|
self._eventObj = self._eventObj # move from class to instance
|
||||||
|
|
||||||
@@ -113,7 +114,6 @@ def axw__init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, s
|
|||||||
# hook some wx events
|
# hook some wx events
|
||||||
self.Bind(wx.EVT_SIZE, self.axw_OnSize)
|
self.Bind(wx.EVT_SIZE, self.axw_OnSize)
|
||||||
|
|
||||||
|
|
||||||
def axw__getattr__(self, attr):
|
def axw__getattr__(self, attr):
|
||||||
try:
|
try:
|
||||||
return pywin.mfc.activex.Control.__getattr__(self, attr)
|
return pywin.mfc.activex.Control.__getattr__(self, attr)
|
||||||
|
Reference in New Issue
Block a user