phoenix_title wx.GBSizerItem

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.


class_hierarchy Class Hierarchy

Inheritance diagram for class GBSizerItem:

method_summary Methods Summary

__init__

Construct a sizer item for tracking a spacer.

GetEndPos

Get the row and column of the endpoint of this item.

GetGBSizer

GetPos

Get the grid position of the item.

GetSpan

Get the row and column spanning of the item.

Intersects

Returns True if this item and the other item intersect.

SetGBSizer

SetPos

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.

SetSpan

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.


property_summary Properties Summary

GBSizer

See GetGBSizer and SetGBSizer

Pos

See GetPos and SetPos

Span

See GetSpan and SetSpan


api Class API

class 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.


Methods

__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self, width, height, pos, span=DefaultSpan, flag=0, border=0, userData=None)

Construct a sizer item for tracking a spacer.

Parameters:
  • 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.

Parameters:



__init__ (self, sizer, pos, span=DefaultSpan, flag=0, border=0, userData=None)

Construct a sizer item for tracking a subsizer.

Parameters:





GetEndPos(self)

Get the row and column of the endpoint of this item.

Return type:

tuple

Returns:

( row, col )



GetGBSizer(self)
Return type:

wx.GridBagSizer



GetPos(self)

Get the grid position of the item.

Return type:

wx.GBPosition



GetSpan(self)

Get the row and column spanning of the item.

Return type:

wx.GBSpan



Intersects(self, *args, **kw)

overload Overloaded Implementations:



Intersects (self, other)

Returns True if this item and the other item intersect.

Parameters:

other (wx.GBSizerItem) –

Return type:

bool



Intersects (self, pos, span)

Returns True if the given pos/span would intersect with this item.

Parameters:
Return type:

bool





SetGBSizer(self, sizer)
Parameters:

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.

Parameters:

pos (wx.GBPosition) –

Return type:

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.

Parameters:

span (wx.GBSpan) –

Return type:

bool


Properties

GBSizer

See GetGBSizer and SetGBSizer



Pos

See GetPos and SetPos



Span

See GetSpan and SetSpan