.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.GBSizerItem:
==========================================================================================================================================
|phoenix_title| **wx.GBSizerItem**
==========================================================================================================================================
The :ref:`wx.GBSizerItem` class is used by the :ref:`wx.GridBagSizer` for tracking the items in the sizer.
It adds grid position and spanning information to the normal :ref:`wx.SizerItem` by adding :ref:`wx.GBPosition` and :ref:`wx.GBSpan` attributes. Most of the time you will not need to use a :ref:`wx.GBSizerItem` directly in your code, but there are a couple of cases where it is handy.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
GBSizerItem:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.GBSizerItem.__init__` Construct a sizer item for tracking a spacer.
:meth:`~wx.GBSizerItem.GetEndPos` Get the row and column of the endpoint of this item.
:meth:`~wx.GBSizerItem.GetGBSizer`
:meth:`~wx.GBSizerItem.GetPos` Get the grid position of the item.
:meth:`~wx.GBSizerItem.GetSpan` Get the row and column spanning of the item.
:meth:`~wx.GBSizerItem.Intersects` Returns ``True`` if this item and the `other` item intersect.
:meth:`~wx.GBSizerItem.SetGBSizer`
:meth:`~wx.GBSizerItem.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.
:meth:`~wx.GBSizerItem.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
=====================================
================================================================================ ================================================================================
:attr:`~wx.GBSizerItem.GBSizer` See :meth:`~wx.GBSizerItem.GetGBSizer` and :meth:`~wx.GBSizerItem.SetGBSizer`
:attr:`~wx.GBSizerItem.Pos` See :meth:`~wx.GBSizerItem.GetPos` and :meth:`~wx.GBSizerItem.SetPos`
:attr:`~wx.GBSizerItem.Span` See :meth:`~wx.GBSizerItem.GetSpan` and :meth:`~wx.GBSizerItem.SetSpan`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.GBSizerItem(SizerItem)
**Possible constructors**::
GBSizerItem(width : int, height : int, pos : GBPosition, span:
GBSpan=DefaultSpan, flag: int=0, border: int=0, userData:
Optional[PyUserData]=None) -> None
GBSizerItem(window : Window, pos : GBPosition, span: GBSpan=DefaultSpan,
flag: int=0, border: int=0, userData: Optional[PyUserData]=None) -> None
GBSizerItem(sizer : Sizer, pos : GBPosition, span: GBSpan=DefaultSpan,
flag: int=0, border: int=0, userData: Optional[PyUserData]=None) -> None
The GBSizerItem class is used by the GridBagSizer for tracking the
items in the sizer.
.. method:: __init__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__init__** `(self, width : int, height : int, pos : GBPosition, span: GBSpan=DefaultSpan, flag: int=0, border: int=0, userData: Optional[PyUserData]=None)`
Construct a sizer item for tracking a spacer.
:param `width`:
:type `width`: int
:param `height`:
:type `height`: int
:param `pos`:
:type `pos`: wx.GBPosition
:param `span`:
:type `span`: wx.GBSpan
:param `flag`:
:type `flag`: int
:param `border`:
:type `border`: int
:param `userData`:
:type `userData`: PyUserData
:rtype: `None`
:html:`
`
**__init__** `(self, window : Window, pos : GBPosition, span: GBSpan=DefaultSpan, flag: int=0, border: int=0, userData: Optional[PyUserData]=None)`
Construct a sizer item for tracking a window.
:param `window`:
:type `window`: wx.Window
:param `pos`:
:type `pos`: wx.GBPosition
:param `span`:
:type `span`: wx.GBSpan
:param `flag`:
:type `flag`: int
:param `border`:
:type `border`: int
:param `userData`:
:type `userData`: PyUserData
:rtype: `None`
:html:`
`
**__init__** `(self, sizer : Sizer, pos : GBPosition, span: GBSpan=DefaultSpan, flag: int=0, border: int=0, userData: Optional[PyUserData]=None)`
Construct a sizer item for tracking a subsizer.
:param `sizer`:
:type `sizer`: wx.Sizer
:param `pos`:
:type `pos`: wx.GBPosition
:param `span`:
:type `span`: wx.GBSpan
:param `flag`:
:type `flag`: int
:param `border`:
:type `border`: int
:param `userData`:
:type `userData`: PyUserData
:rtype: `None`
:html:`
`
.. method:: GetEndPos(self)
Get the row and column of the endpoint of this item.
:rtype: :ref:`Tuple[int, int]`
.. method:: GetGBSizer(self)
:rtype: :ref:`wx.GridBagSizer`
.. method:: GetPos(self)
Get the grid position of the item.
:rtype: :ref:`wx.GBPosition`
.. method:: GetSpan(self)
Get the row and column spanning of the item.
:rtype: :ref:`wx.GBSpan`
.. method:: Intersects(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**Intersects** `(self, other : GBSizerItem)`
Returns ``True`` if this item and the `other` item intersect.
:param `other`:
:type `other`: wx.GBSizerItem
:rtype: `bool`
:html:`
`
**Intersects** `(self, pos : GBPosition, span : GBSpan)`
Returns ``True`` if the given pos/span would intersect with this item.
:param `pos`:
:type `pos`: wx.GBPosition
:param `span`:
:type `span`: wx.GBSpan
:rtype: `bool`
:html:`
`
.. method:: SetGBSizer(self, sizer : GridBagSizer)
:param `sizer`:
:type `sizer`: wx.GridBagSizer
:rtype: `None`
.. method:: SetPos(self, pos : GBPosition)
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.
:param `pos`:
:type `pos`: wx.GBPosition
:rtype: `bool`
.. method:: SetSpan(self, span : GBSpan)
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.
:param `span`:
:type `span`: wx.GBSpan
:rtype: `bool`
.. attribute:: GBSizer
See :meth:`~wx.GBSizerItem.GetGBSizer` and :meth:`~wx.GBSizerItem.SetGBSizer`
.. attribute:: Pos
See :meth:`~wx.GBSizerItem.GetPos` and :meth:`~wx.GBSizerItem.SetPos`
.. attribute:: Span
See :meth:`~wx.GBSizerItem.GetSpan` and :meth:`~wx.GBSizerItem.SetSpan`