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
This commit is contained in:
@@ -554,7 +554,17 @@ Find the sizer item for the given window or subsizer, returns None if
|
|||||||
not found. (non-recursive)", "");
|
not found. (non-recursive)", "");
|
||||||
wxGBSizerItem* FindItem(wxWindow* window);
|
wxGBSizerItem* FindItem(wxWindow* window);
|
||||||
wxGBSizerItem* FindItem(wxSizer* sizer);
|
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(
|
DocDeclStr(
|
||||||
wxGBSizerItem* , FindItemAtPosition(const wxGBPosition& pos),
|
wxGBSizerItem* , FindItemAtPosition(const wxGBPosition& pos),
|
||||||
|
Reference in New Issue
Block a user