.. 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.Position:
==========================================================================================================================================
|phoenix_title| **wx.Position**
==========================================================================================================================================
This class represents the position of an item in any kind of grid of rows and columns such as :ref:`wx.GridBagSizer`, or :ref:`wx.HVScrolledWindow`.
.. seealso:: :ref:`wx.Point`, :ref:`wx.Size`
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
Position:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.Position.__init__` Construct a new :ref:`wx.Position`, setting the row and column to the default value of (0, 0).
:meth:`~wx.Position.Get` Return the row and col properties as a tuple.
:meth:`~wx.Position.GetCol` A synonym for :meth:`~Position.GetColumn` .
:meth:`~wx.Position.GetColumn` Get the current row value.
:meth:`~wx.Position.GetIM` Returns an immutable representation of the ``wx.Position`` object, based on ``namedtuple``.
:meth:`~wx.Position.GetRow` Get the current row value.
:meth:`~wx.Position.SetCol` A synonym for :meth:`~Position.SetColumn` .
:meth:`~wx.Position.SetColumn` Set a new column value.
:meth:`~wx.Position.SetRow` Set a new row value.
:meth:`~wx.Position.__bool__`
:meth:`~wx.Position.__getitem__`
:meth:`~wx.Position.__len__`
:meth:`~wx.Position.__nonzero__`
:meth:`~wx.Position.__reduce__`
:meth:`~wx.Position.__repr__`
:meth:`~wx.Position.__setitem__`
:meth:`~wx.Position.__str__`
:meth:`~wx.Position.__ne__`
:meth:`~wx.Position.__add__`
:meth:`~wx.Position.__iadd__`
:meth:`~wx.Position.__sub__`
:meth:`~wx.Position.__isub__`
:meth:`~wx.Position.__eq__`
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.Position.Col` See :meth:`~wx.Position.GetCol` and :meth:`~wx.Position.SetCol`
:attr:`~wx.Position.Column` See :meth:`~wx.Position.GetColumn` and :meth:`~wx.Position.SetColumn`
:attr:`~wx.Position.IM` See :meth:`~wx.Position.GetIM`
:attr:`~wx.Position.Row` See :meth:`~wx.Position.GetRow` and :meth:`~wx.Position.SetRow`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.Position(object)
**Possible constructors**::
Position() -> None
Position(row : int, col : int) -> None
This class represents the position of an item in any kind of grid of
rows and columns such as GridBagSizer, or HVScrolledWindow.
.. method:: __init__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__init__** `(self)`
Construct a new :ref:`wx.Position`, setting the row and column to the default value of (0, 0).
:rtype: `None`
:html:`
`
**__init__** `(self, row : int, col : int)`
Construct a new :ref:`wx.Position`, setting the row and column to the value of (`row`, `col`).
: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)
A synonym for :meth:`GetColumn` .
:rtype: `int`
.. method:: GetColumn(self)
Get the current row value.
:rtype: `int`
.. method:: GetIM(self)
Returns an immutable representation of the ``wx.Position`` 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.Position``
with a simple statement like this: ``obj = wx.Position(imObj)``.
.. method:: GetRow(self)
Get the current row value.
:rtype: `int`
.. method:: SetCol(self, column : int)
A synonym for :meth:`SetColumn` .
:param `column`:
:type `column`: int
:rtype: `None`
.. method:: SetColumn(self, column : int)
Set a new column value.
:param `column`:
:type `column`: 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)
:param `pos`:
:type `pos`: wx.Position
.. method:: __add__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__add__** `(self)`
:param `pos`:
:type `pos`: wx.Position
:html:`
`
**__add__** `(self)`
:param `size`:
:type `size`: wx.Size
:html:`
`
.. method:: __iadd__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__iadd__** `(self)`
:param `pos`:
:type `pos`: wx.Position
:html:`
`
**__iadd__** `(self)`
:param `size`:
:type `size`: wx.Size
:html:`
`
.. method:: __sub__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__sub__** `(self)`
:param `pos`:
:type `pos`: wx.Position
:html:`
`
**__sub__** `(self)`
:param `size`:
:type `size`: wx.Size
:html:`
`
.. method:: __isub__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__isub__** `(self)`
:param `pos`:
:type `pos`: wx.Position
:html:`
`
**__isub__** `(self)`
:param `size`:
:type `size`: wx.Size
:html:`
`
.. method:: __eq__(self)
:param `pos`:
:type `pos`: wx.Position
.. attribute:: Col
See :meth:`~wx.Position.GetCol` and :meth:`~wx.Position.SetCol`
.. attribute:: Column
See :meth:`~wx.Position.GetColumn` and :meth:`~wx.Position.SetColumn`
.. attribute:: IM
See :meth:`~wx.Position.GetIM`
.. attribute:: Row
See :meth:`~wx.Position.GetRow` and :meth:`~wx.Position.SetRow`