X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3bd1e033857b8dd6f4dea024d3f18fcc7682e09d..a4353f07c6b37712634d4b2d86527b647a08044f:/wxPython/src/msw/controls2.py diff --git a/wxPython/src/msw/controls2.py b/wxPython/src/msw/controls2.py index 4e0d8638e8..6ef53ea460 100644 --- a/wxPython/src/msw/controls2.py +++ b/wxPython/src/msw/controls2.py @@ -348,8 +348,8 @@ class wxListEventPtr(wxNotifyEventPtr): def __init__(self,this): self.this = this self.thisown = 0 - def GetCode(self, *_args, **_kwargs): - val = apply(controls2c.wxListEvent_GetCode,(self,) + _args, _kwargs) + def GetKeyCode(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetKeyCode,(self,) + _args, _kwargs) return val def GetIndex(self, *_args, **_kwargs): val = apply(controls2c.wxListEvent_GetIndex,(self,) + _args, _kwargs) @@ -421,6 +421,7 @@ class wxListEventPtr(wxNotifyEventPtr): raise AttributeError,name def __repr__(self): return "" % (self.this,) + GetCode = GetKeyCode class wxListEvent(wxListEventPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controls2c.new_wxListEvent,_args,_kwargs) @@ -634,10 +635,13 @@ class wxListCtrlPtr(wxControlPtr): def SortItems(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_SortItems,(self,) + _args, _kwargs) return val + def GetMainWindow(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_GetMainWindow,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) - def GetItem(self, *_args, **_kwargs): + def GetColumn(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetColumn,(self,) + _args, _kwargs) if val is not None: val.thisown = 1 return val @@ -645,7 +649,7 @@ class wxListCtrlPtr(wxControlPtr): def GetItem(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs) - val.thisown = 1 + if val is not None: val.thisown = 1 return val @@ -868,14 +872,15 @@ class wxTreeEventPtr(wxNotifyEventPtr): val = apply(controls2c.wxTreeEvent_GetKeyEvent,(self,) + _args, _kwargs) if val: val = wxKeyEventPtr(val) return val - def GetCode(self, *_args, **_kwargs): - val = apply(controls2c.wxTreeEvent_GetCode,(self,) + _args, _kwargs) + def GetKeyCode(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeEvent_GetKeyCode,(self,) + _args, _kwargs) return val def GetLabel(self, *_args, **_kwargs): val = apply(controls2c.wxTreeEvent_GetLabel,(self,) + _args, _kwargs) return val def __repr__(self): return "" % (self.this,) + GetCode = GetKeyCode class wxTreeEvent(wxTreeEventPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controls2c.new_wxTreeEvent,_args,_kwargs)