************** wx.GBSizerItem ************** Inheritance diagram for `wx.GBSizerItem`: | .. inheritance-diagram:: 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 ^^^^^^^^^^^^^ * `wx.SizerItem `_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetEndPos <#GetEndPos>`_ * `GetGBSizer <#GetGBSizer>`_ * `GetPos <#GetPos>`_ * `GetPosTuple <#GetPosTuple>`_ * `GetSpan <#GetSpan>`_ * `GetSpanTuple <#GetSpanTuple>`_ * `Intersects <#Intersects>`_ * `IntersectsPos <#IntersectsPos>`_ * `SetGBSizer <#SetGBSizer>`_ * `SetPos <#SetPos>`_ * `SetSpan <#SetSpan>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `EndPos <#EndPos>`_ * `GBSizer <#GBSizer>`_ * `Pos <#Pos>`_ * `Span <#Span>`_ Class API ========= Methods ^^^^^^^ .. method:: __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 `_ -------- .. method:: GetEndPos() Get the row and column of the endpoint of this item | **Returns:** `wx.GBPosition `_ -------- .. method:: GetGBSizer() Get the sizer this item is a member of. | **Returns:** `wx.GridBagSizer `_ -------- .. method:: GetPos() Get the grid position of the item. | **Returns:** `wx.GBPosition `_ -------- .. method:: GetPosTuple() Get the grid position of the item. | **Returns:** `(I, J)` -------- .. method:: GetSpan() Get the row and column spanning of the item. | **Returns:** `wx.GBSpan `_ -------- .. method:: GetSpanTuple() Get the row and column spanning of the item. | **Returns:** `(row, col)` -------- .. method:: Intersects(other) Returns ``True`` if the given pos/span would intersect with this item. **Parameters:** * `other` (`wx.GBSizerItem `_) | **Returns:** `bool` -------- .. method:: IntersectsPos(pos, span) Returns ``True`` if the given pos/span would intersect with this item. **Parameters:** * `pos` (`wx.GBPosition `_) * `span` (`wx.GBSpan `_) | **Returns:** `bool` -------- .. method:: SetGBSizer(sizer) Set the sizer this item is a member of. **Parameters:** * `sizer` (`wx.GridBagSizer `_) -------- .. method:: 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:** * `pos` (`wx.GBPosition `_) | **Returns:** `bool` -------- .. method:: 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:** * `span` (`wx.GBSpan `_) | **Returns:** `bool` -------- Properties ^^^^^^^^^^ .. attribute:: EndPos See `GetEndPos <#GetEndPos>`_ .. attribute:: GBSizer See `GetGBSizer <#GetGBSizer>`_ and `SetGBSizer <#SetGBSizer>`_ .. attribute:: Pos See `GetPos <#GetPos>`_ and `SetPos <#SetPos>`_ .. attribute:: Span See `GetSpan <#GetSpan>`_ and `SetSpan <#SetSpan>`_