Attachment 'AddLinearSpacer.PY'
Download
""" Simple, foolproof function to properly insert a
one-dimensional spacer along its major axis
regardless of the sizer's orientation.
This is a safer alternative to the .AddSpacer( n )
method which produces a square shaped spacer which can
unintentionally interfere with adjacent controls and
control blocks stacked along the minor axis by an
outer sizer.
Ray Pasco
2010-09-25-Sat__PM-03-14-19__September
"""
import wx
def AddLinearSpacer( boxsizer, pixelSpacing ) :
""" A one-dimensional spacer for use with any BoxSizer """
orientation = boxsizer.GetOrientation()
if (orientation == wx.HORIZONTAL) :
boxsizer.Add( (pixelSpacing, 0) )
elif (orientation == wx.VERTICAL) :
boxsizer.Add( (0, pixelSpacing) )
#end if
#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.
