Home | Trees | Index | Help |
|
---|
Package wx :: Class SizerFlags |
|
object
--+
|
SizerFlags
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.
Method Summary | |
---|---|
SizerFlags |
Constructs the flags object with the specified proportion. |
__del__(self)
| |
SizerFlags |
Sets the item's alignment |
SizerFlags |
Sets the border of the item in the direction(s) or sides given by the direction parameter. |
SizerFlags |
Aligns the object to the bottom of the available space, a shortcut for calling Align(wx.ALIGN_BOTTOM) |
SizerFlags |
Sets the centering alignment flags. |
SizerFlags |
Same as Center for those with an alternate dialect of English. |
SizerFlags |
Sets the border in the given direction to twice the default border size. |
SizerFlags |
Sets the left and right borders to twice the default border size. |
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. |
SizerFlags |
Sets the wx.FIXED_MINSIZE flag. |
int |
Returns the border value in pixels to be used in the sizer item. |
int |
Returns the default border size used by the other border methods (Static method) |
int |
Returns the flags value to be used in the sizer item. |
int |
Returns the proportion value to be used in the sizer item. |
SizerFlags |
Sets the left and right borders to the default border size. |
SizerFlags |
Aligns the object to the left, a shortcut for calling Align(wx.ALIGN_LEFT) |
SizerFlags |
Sets the item's proportion value. |
SizerFlags |
Aligns the object to the right, a shortcut for calling Align(wx.ALIGN_RIGHT) |
SizerFlags |
Sets the wx.SHAPED flag. |
SizerFlags |
Aligns the object to the top of the available space, a shortcut for calling Align(wx.ALIGN_TOP) |
SizerFlags |
Sets the border in the given direction to three times the default border size. |
Property Summary | |
---|---|
thisown : The membership flag |
Instance Method Details |
---|
__init__(self,
proportion=0)
|
Align(self, alignment)Sets the item's alignment
|
Border(self, direction=ALL, borderInPixels=-1)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
|
Bottom(self)Aligns the object to the bottom of the available space, a shortcut for calling Align(wx.ALIGN_BOTTOM)
|
Center(self)Sets the centering alignment flags.
|
Centre(self)Same as
|
DoubleBorder(self, direction=ALL)Sets the border in the given direction to twice the default border size.
|
DoubleHorzBorder(self)Sets the left and right borders to twice the default border size.
|
Expand(self)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.
|
FixedMinSize(self)Sets the wx.FIXED_MINSIZE flag.
|
GetBorderInPixels(self)Returns the border value in pixels to be used in the sizer item.
|
GetFlags(self)Returns the flags value to be used in the sizer item.
|
GetProportion(self)Returns the proportion value to be used in the sizer item.
|
HorzBorder(self)Sets the left and right borders to the default border size.
|
Left(self)Aligns the object to the left, a shortcut for calling Align(wx.ALIGN_LEFT)
|
Proportion(self, proportion)Sets the item's proportion value.
|
Right(self)Aligns the object to the right, a shortcut for calling Align(wx.ALIGN_RIGHT)
|
Shaped(self)Sets the wx.SHAPED flag.
|
Top(self)Aligns the object to the top of the available space, a shortcut for calling Align(wx.ALIGN_TOP)
|
TripleBorder(self, direction=ALL)Sets the border in the given direction to three times the default border size.
|
Static Method Details |
---|
GetDefaultBorder()Returns the default border size used by the other border methods
|
Property Details |
---|
thisownThe membership flag |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:09:55 2007 | http://epydoc.sf.net |