.. 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.GBPosition:
==========================================================================================================================================
|phoenix_title| **wx.GBPosition**
==========================================================================================================================================
This class represents the position of an item in a virtual grid of rows and columns managed by a :ref:`wx.GridBagSizer`.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
GBPosition:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.GBPosition.__init__` Default constructor, setting the row and column to (0,0).
:meth:`~wx.GBPosition.Get` Return the row and col properties as a tuple.
:meth:`~wx.GBPosition.GetCol` Get the current column value.
:meth:`~wx.GBPosition.GetIM` Returns an immutable representation of the ``wx.GBPosition`` object, based on ``namedtuple``.
:meth:`~wx.GBPosition.GetRow` Get the current row value.
:meth:`~wx.GBPosition.Set` Set both the row and column properties.
:meth:`~wx.GBPosition.SetCol` Set a new column value.
:meth:`~wx.GBPosition.SetRow` Set a new row value.
:meth:`~wx.GBPosition.__bool__`
:meth:`~wx.GBPosition.__getitem__`
:meth:`~wx.GBPosition.__len__`
:meth:`~wx.GBPosition.__nonzero__`
:meth:`~wx.GBPosition.__reduce__`
:meth:`~wx.GBPosition.__repr__`
:meth:`~wx.GBPosition.__setitem__`
:meth:`~wx.GBPosition.__str__`
:meth:`~wx.GBPosition.__ne__` Compare inequality of two GBPositions.
:meth:`~wx.GBPosition.__eq__` Compare equality of two GBPositions.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.GBPosition.Col` See :meth:`~wx.GBPosition.GetCol` and :meth:`~wx.GBPosition.SetCol`
:attr:`~wx.GBPosition.Row` See :meth:`~wx.GBPosition.GetRow` and :meth:`~wx.GBPosition.SetRow`
:attr:`~wx.GBPosition.col` See :meth:`~wx.GBPosition.GetCol` and :meth:`~wx.GBPosition.SetCol`
:attr:`~wx.GBPosition.row` See :meth:`~wx.GBPosition.GetRow` and :meth:`~wx.GBPosition.SetRow`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.GBPosition(object)
**Possible constructors**::
GBPosition() -> None
GBPosition(row : int, col : int) -> None
This class represents the position of an item in a virtual grid of
rows and columns managed by a GridBagSizer.
.. method:: __init__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__init__** `(self)`
Default constructor, setting the row and column to (0,0).
:rtype: `None`
:html:`
`
**__init__** `(self, row : int, col : int)`
Construct a new :ref:`wx.GBPosition`, setting the row and column.
:param `row`:
:type `row`: int
:param `col`:
:type `col`: int
:rtype: `None`
:html:`
`
.. method:: Get(self)
Return the row and col properties as a tuple.
:rtype: `tuple`
:returns:
( `row`, `col` )
.. method:: GetCol(self)
Get the current column value.
:rtype: `int`
.. method:: GetIM(self)
Returns an immutable representation of the ``wx.GBPosition`` object, based on ``namedtuple``.
This new object is hashable and can be used as a dictionary key,
be added to sets, etc. It can be converted back into a real ``wx.GBPosition``
with a simple statement like this: ``obj = wx.GBPosition(imObj)``.
.. method:: GetRow(self)
Get the current row value.
:rtype: `int`
.. method:: Set(self, row: int=0, col: int=0)
Set both the row and column properties.
:rtype: `None`
.. method:: SetCol(self, col : int)
Set a new column value.
:param `col`:
:type `col`: int
:rtype: `None`
.. method:: SetRow(self, row : int)
Set a new row value.
:param `row`:
:type `row`: int
:rtype: `None`
.. method:: __bool__(self)
.. method:: __getitem__(self, idx)
.. method:: __len__(self)
.. method:: __nonzero__(self)
.. method:: __reduce__(self)
.. method:: __repr__(self)
.. method:: __setitem__(self, idx, val)
.. method:: __str__(self)
.. method:: __ne__(self)
Compare inequality of two GBPositions.
:param `p`:
:type `p`: wx.GBPosition
.. method:: __eq__(self)
Compare equality of two GBPositions.
:param `p`:
:type `p`: wx.GBPosition
.. attribute:: Col
See :meth:`~wx.GBPosition.GetCol` and :meth:`~wx.GBPosition.SetCol`
.. attribute:: Row
See :meth:`~wx.GBPosition.GetRow` and :meth:`~wx.GBPosition.SetRow`
.. attribute:: col
See :meth:`~wx.GBPosition.GetCol` and :meth:`~wx.GBPosition.SetCol`
.. attribute:: row
See :meth:`~wx.GBPosition.GetRow` and :meth:`~wx.GBPosition.SetRow`