wx.GBSizerItem

Inheritance diagram for wx.GBSizerItem:



Description

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.

Derived From

Properties Summary

Class API

Methods

__init__()

Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer size will need to be set, as well as a position and span before this item can be used in a sizer.

You will probably never need to create a wx.GBSizerItem directly as they are created automatically when the sizer’s Add method is called.


Returns:

wx.GBSizerItem


GetEndPos()

Get the row and column of the endpoint of this item


Returns:

wx.GBPosition


GetGBSizer()

Get the sizer this item is a member of.


Returns:

wx.GridBagSizer


GetPos()

Get the grid position of the item.


Returns:

wx.GBPosition


GetPosTuple()

Get the grid position of the item.


Returns:

(I, J)


GetSpan()

Get the row and column spanning of the item.


Returns:

wx.GBSpan


GetSpanTuple()

Get the row and column spanning of the item.


Returns:

(row, col)


Intersects(other)

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

Parameters:


Returns:

bool


IntersectsPos(pos, span)

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

Parameters:


Returns:

bool


SetGBSizer(sizer)

Set the sizer this item is a member of.

Parameters:


SetPos(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:


Returns:

bool


SetSpan(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:


Returns:

bool


Properties

EndPos
See GetEndPos
GBSizer
See GetGBSizer and SetGBSizer
Pos
See GetPos and SetPos
Span
See GetSpan and SetSpan