Attachment 'AddLinearSpacer.py'
Download 1 """ Simple foolproof function to properly insert a
2 one-dimensional BoxSizer spacer along its major axis
3 regardless of the sizer's orientation.
4
5 Ray Pasco
6 2010-09-25-Sat__PM-03-14-19__September
7
8 """
9
10 def AddLinearSpacer( boxsizer, pixelSpacing ) :
11 """ A one-dimensional spacer for use with any BoxSizer """
12
13 orientation = boxsizer.GetOrientation()
14 if (orientation == wx.HORIZONTAL) :
15 boxsizer.Add( (pixelSpacing, 0) )
16
17 elif (orientation == wx.VERTICAL) :
18 boxsizer.Add( (0, pixelSpacing) )
19 #end if
20
21 #end def
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.