From: Robin Dunn Date: Tue, 30 Dec 2003 01:39:36 +0000 (+0000) Subject: a bit of tweaking X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c3bc3b61841b84d1b81108f8b5133981771da648 a bit of tweaking git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/wx/lib/rcsizer.py b/wxPython/wx/lib/rcsizer.py index a95485b51f..14829fc3de 100644 --- a/wxPython/wx/lib/rcsizer.py +++ b/wxPython/wx/lib/rcsizer.py @@ -14,10 +14,14 @@ # o 2.5 compatability update. # o There appears to be a prob with the wx.PySizer.GetSize() method. # +# 12/23/2003 - Jeff Grimmett (grimmtooth@softhome.net) +# +# o wx.PySizer.GetSize() method working right now. +# """ -A pure-Python wxSizer that lays out items in a grid similar to -wxFlexGridSizer but item position is not implicit but explicitly +A pure-Python Sizer that lays out items in a grid similar to +wx.FlexGridSizer but item position is not implicit but explicitly specified by row and col, and row/col spanning is supported. Adapted from code by Niki Spahiev. @@ -71,9 +75,11 @@ class RowColSizer(wx.PySizer): #-------------------------------------------------- def Add(self, item, option=0, flag=0, border=0, - row=-1, col=-1, # row, col and spanning can be specified individually... + # row, col and spanning can be specified individually... + row=-1, col=-1, rowspan=1, colspan=1, - pos=None, size=None, # or as tuples (row,col) and (rowspan,colspan) + # or as tuples (row,col) and (rowspan,colspan) + pos=None, size=None, ): if pos is not None: @@ -89,7 +95,7 @@ class RowColSizer(wx.PySizer): # flag = flag | wx.EXPAND wx.PySizer.Add(self, item, option, flag, border, - userData=(row, col, row+rowspan, col+colspan)) + userData=(row, col, row+rowspan, col+colspan)) #AddWindow = Add #AddSizer = Add