+class SizerFlags(object):
+ """
+ Normally, when you add an item to a sizer via `wx.Sizer.Add`, you have
+ to specify a lot of flags and parameters which can be unwieldy. This
+ is where wx.SizerFlags comes in: it allows you to specify all
+ parameters using the named methods instead. For example, instead of::
+
+ sizer.Add(ctrl, 0, wx.EXPAND | wx.ALL, 10)
+
+ you can now write::
+
+ sizer.AddF(ctrl, wx.SizerFlags().Expand().Border(wx.ALL, 10))
+
+ This is more readable and also allows you to create wx.SizerFlags
+ objects which can be reused for several sizer items.::
+
+ flagsExpand = wx.SizerFlags(1)
+ flagsExpand.Expand().Border(wx.ALL, 10)
+ sizer.AddF(ctrl1, flagsExpand)
+ sizer.AddF(ctrl2, flagsExpand)
+
+ Note that by specification, all methods of wx.SizerFlags return the
+ wx.SizerFlags object itself allowing chaining multiple method calls
+ like in the examples above.
+ """
+ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args, **kwargs):
+ """
+ __init__(self, int proportion=0) -> SizerFlags
+
+ Constructs the flags object with the specified proportion.
+ """
+ _core_.SizerFlags_swiginit(self,_core_.new_SizerFlags(*args, **kwargs))
+ __swig_destroy__ = _core_.delete_SizerFlags
+ __del__ = lambda self : None;
+ def Proportion(*args, **kwargs):
+ """
+ Proportion(self, int proportion) -> SizerFlags
+
+ Sets the item's proportion value.
+ """
+ return _core_.SizerFlags_Proportion(*args, **kwargs)
+
+ def Align(*args, **kwargs):
+ """
+ Align(self, int alignment) -> SizerFlags
+
+ Sets the item's alignment
+ """
+ return _core_.SizerFlags_Align(*args, **kwargs)
+
+ def Expand(*args, **kwargs):
+ """
+ Expand(self) -> SizerFlags
+
+ Sets the wx.EXPAND flag, which will cause the item to be expanded to
+ fill as much space as it is given by the sizer.
+ """
+ return _core_.SizerFlags_Expand(*args, **kwargs)
+
+ def Centre(*args, **kwargs):
+ """
+ Centre(self) -> SizerFlags
+
+ Same as `Center` for those with an alternate dialect of English.
+ """
+ return _core_.SizerFlags_Centre(*args, **kwargs)
+
+ def Center(*args, **kwargs):
+ """
+ Center(self) -> SizerFlags
+
+ Sets the centering alignment flags.
+ """
+ return _core_.SizerFlags_Center(*args, **kwargs)
+
+ def Left(*args, **kwargs):
+ """
+ Left(self) -> SizerFlags
+
+ Aligns the object to the left, a shortcut for calling
+ Align(wx.ALIGN_LEFT)
+ """
+ return _core_.SizerFlags_Left(*args, **kwargs)
+
+ def Right(*args, **kwargs):
+ """
+ Right(self) -> SizerFlags
+
+ Aligns the object to the right, a shortcut for calling
+ Align(wx.ALIGN_RIGHT)
+ """
+ return _core_.SizerFlags_Right(*args, **kwargs)
+
+ def Top(*args, **kwargs):
+ """
+ Top(self) -> SizerFlags
+
+ Aligns the object to the top of the available space, a shortcut for
+ calling Align(wx.ALIGN_TOP)
+ """
+ return _core_.SizerFlags_Top(*args, **kwargs)
+
+ def Bottom(*args, **kwargs):
+ """
+ Bottom(self) -> SizerFlags
+
+ Aligns the object to the bottom of the available space, a shortcut for
+ calling Align(wx.ALIGN_BOTTOM)
+ """
+ return _core_.SizerFlags_Bottom(*args, **kwargs)
+
+ def Shaped(*args, **kwargs):
+ """
+ Shaped(self) -> SizerFlags
+
+ Sets the wx.SHAPED flag.
+ """
+ return _core_.SizerFlags_Shaped(*args, **kwargs)
+
+ def FixedMinSize(*args, **kwargs):
+ """
+ FixedMinSize(self) -> SizerFlags
+
+ Sets the wx.FIXED_MINSIZE flag.
+ """
+ return _core_.SizerFlags_FixedMinSize(*args, **kwargs)
+
+ def Border(*args, **kwargs):
+ """
+ Border(self, int direction=ALL, int borderInPixels=-1) -> SizerFlags
+
+ Sets the border of the item in the direction(s) or sides given by the
+ direction parameter. If the borderInPixels value is not given then
+ the default border size (see `GetDefaultBorder`) will be used.
+ """
+ return _core_.SizerFlags_Border(*args, **kwargs)
+
+ def DoubleBorder(*args, **kwargs):
+ """
+ DoubleBorder(self, int direction=ALL) -> SizerFlags
+
+ Sets the border in the given direction to twice the default border
+ size.
+ """
+ return _core_.SizerFlags_DoubleBorder(*args, **kwargs)
+
+ def TripleBorder(*args, **kwargs):
+ """
+ TripleBorder(self, int direction=ALL) -> SizerFlags
+
+ Sets the border in the given direction to three times the default
+ border size.
+ """
+ return _core_.SizerFlags_TripleBorder(*args, **kwargs)
+
+ def HorzBorder(*args, **kwargs):
+ """
+ HorzBorder(self) -> SizerFlags
+
+ Sets the left and right borders to the default border size.
+ """
+ return _core_.SizerFlags_HorzBorder(*args, **kwargs)
+
+ def DoubleHorzBorder(*args, **kwargs):
+ """
+ DoubleHorzBorder(self) -> SizerFlags
+
+ Sets the left and right borders to twice the default border size.
+ """
+ return _core_.SizerFlags_DoubleHorzBorder(*args, **kwargs)
+
+ def GetDefaultBorder(*args, **kwargs):
+ """
+ GetDefaultBorder() -> int
+
+ Returns the default border size used by the other border methods
+ """
+ return _core_.SizerFlags_GetDefaultBorder(*args, **kwargs)
+
+ GetDefaultBorder = staticmethod(GetDefaultBorder)
+ def GetProportion(*args, **kwargs):
+ """
+ GetProportion(self) -> int
+
+ Returns the proportion value to be used in the sizer item.
+ """
+ return _core_.SizerFlags_GetProportion(*args, **kwargs)
+
+ def GetFlags(*args, **kwargs):
+ """
+ GetFlags(self) -> int
+
+ Returns the flags value to be used in the sizer item.
+ """
+ return _core_.SizerFlags_GetFlags(*args, **kwargs)
+
+ def GetBorderInPixels(*args, **kwargs):
+ """
+ GetBorderInPixels(self) -> int
+
+ Returns the border value in pixels to be used in the sizer item.
+ """
+ return _core_.SizerFlags_GetBorderInPixels(*args, **kwargs)
+
+_core_.SizerFlags_swigregister(SizerFlags)
+
+def SizerFlags_GetDefaultBorder(*args):
+ """
+ SizerFlags_GetDefaultBorder() -> int
+
+ Returns the default border size used by the other border methods
+ """
+ return _core_.SizerFlags_GetDefaultBorder(*args)
+