X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/85247b36714d520cf2ebb92fe6b4fc039f2db9d0..7d1f4c3ff01b09105c07d5e176a14428c834975e:/wxPython/src/controls2.i diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index ebbb299a32..5f0077a7bf 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -421,7 +421,22 @@ public: bool SetBackgroundColour(const wxColour& col); // Gets information about this column - bool GetColumn(int col, wxListItem& item) const; + // bool GetColumn(int col, wxListItem& item) const; + %addmethods { + %new wxListItem* GetColumn(int col) { + wxListItem item; + if (self->GetColumn(col, item)) + return new wxListItem(item); + else + return NULL; + } + } // The OOR typemaps don't know what to do with the %new, so fix it up. + %pragma(python) addtoclass = " + def GetItem(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_GetColumn,(self,) + _args, _kwargs) + if val is not None: val.thisown = 1 + return val + " // Sets information about this column bool SetColumn(int col, wxListItem& item) ;