The wx.GBSizerItem class is used by the wx.GridBagSizer for tracking the items in the sizer.
It adds grid position and spanning information to the normal wx.SizerItem by adding wx.GBPosition and wx.GBSpan attributes. Most of the time you will not need to use a wx.GBSizerItem directly in your code, but there are a couple of cases where it is handy.
Construct a sizer item for tracking a spacer. |
|
Get the row and column of the endpoint of this item. |
|
Get the grid position of the item. |
|
Get the row and column spanning of the item. |
|
Returns |
|
If the item is already a member of a sizer then first ensure that there is no other item that would intersect with this one at the new position, then set the new position. |
|
If the item is already a member of a sizer then first ensure that there is no other item that would intersect with this one with its new spanning size, then set the new spanning. |
See |
|
wx.
GBSizerItem
(SizerItem)¶Possible constructors:
GBSizerItem(width, height, pos, span=DefaultSpan, flag=0, border=0,
userData=None)
GBSizerItem(window, pos, span=DefaultSpan, flag=0, border=0,
userData=None)
GBSizerItem(sizer, pos, span=DefaultSpan, flag=0, border=0,
userData=None)
The GBSizerItem class is used by the GridBagSizer for tracking the items in the sizer.
__init__
(self, *args, **kw)¶__init__ (self, width, height, pos, span=DefaultSpan, flag=0, border=0, userData=None)
Construct a sizer item for tracking a spacer.
width (int) –
height (int) –
pos (wx.GBPosition) –
span (wx.GBSpan) –
flag (int) –
border (int) –
userData (PyUserData) –
__init__ (self, window, pos, span=DefaultSpan, flag=0, border=0, userData=None)
Construct a sizer item for tracking a window.
window (wx.Window) –
pos (wx.GBPosition) –
span (wx.GBSpan) –
flag (int) –
border (int) –
userData (PyUserData) –
__init__ (self, sizer, pos, span=DefaultSpan, flag=0, border=0, userData=None)
Construct a sizer item for tracking a subsizer.
sizer (wx.Sizer) –
pos (wx.GBPosition) –
span (wx.GBSpan) –
flag (int) –
border (int) –
userData (PyUserData) –
GetEndPos
(self)¶Get the row and column of the endpoint of this item.
tuple
( row, col )
GetGBSizer
(self)¶GetPos
(self)¶Get the grid position of the item.
Intersects
(self, *args, **kw)¶Intersects (self, other)
Returns True
if this item and the other item intersect.
other (wx.GBSizerItem) –
bool
Intersects (self, pos, span)
Returns True
if the given pos/span would intersect with this item.
pos (wx.GBPosition) –
span (wx.GBSpan) –
bool
SetGBSizer
(self, sizer)¶sizer (wx.GridBagSizer) –
SetPos
(self, pos)¶If the item is already a member of a sizer then first ensure that there is no other item that would intersect with this one at the new position, then set the new position.
Returns True
if the change is successful and after the next Layout the item will be moved.
pos (wx.GBPosition) –
bool
SetSpan
(self, span)¶If the item is already a member of a sizer then first ensure that there is no other item that would intersect with this one with its new spanning size, then set the new spanning.
Returns True
if the change is successful and after the next Layout the item will be resized.
span (wx.GBSpan) –
bool
GBSizer
¶See GetGBSizer
and SetGBSizer