From: Robin Dunn Date: Wed, 17 Jan 2007 23:23:34 +0000 (+0000) Subject: Make GridBagSizer.GetItem use FindItem if possible, to allow a X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7d69a5715e0b348c99c41072ce3d3b4c3b9c62f4 Make GridBagSizer.GetItem use FindItem if possible, to allow a GBSizerItem to be returned instead of a SizerItem git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/src/_gbsizer.i b/wxPython/src/_gbsizer.i index 19a31686ea..c100893129 100644 --- a/wxPython/src/_gbsizer.i +++ b/wxPython/src/_gbsizer.i @@ -554,7 +554,17 @@ Find the sizer item for the given window or subsizer, returns None if not found. (non-recursive)", ""); wxGBSizerItem* FindItem(wxWindow* window); wxGBSizerItem* FindItem(wxSizer* sizer); - + %pythoncode { + def GetItem(self, item): + gbsi = None + si = wx.FlexGridSizer.GetItem(self, item) + if not si: + return None + if type(item) is not int: + gbsi = self.FindItem(item) + if gbsi: return gbsi + return si + } DocDeclStr( wxGBSizerItem* , FindItemAtPosition(const wxGBPosition& pos),