
""" Simple foolproof function to properly insert a
one-dimensional BoxSizer spacer along its major axis 
regardless of the sizer's orientation.

Ray Pasco
2010-09-25-Sat__PM-03-14-19__September

"""

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
