.. 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.grid.GridRangeSelectEvent:
==========================================================================================================================================
|phoenix_title| **wx.grid.GridRangeSelectEvent**
==========================================================================================================================================
Events of this class notify about a range of cells being selected.
When the user uses the mouse for selection, one or more ``SELECTING`` events are generated first, with ``SELECTED`` event generated at the end, when selection is final. This allows the application to handle either the ``SELECTING`` events if it needs to update its state in real-time, as the selection changes, or just the final ``SELECTED`` event, if updating its state on every selection change would be too time-consuming.
Note that if the user performs the selection from keyboard, ``SELECTING`` events are not generated at all, so ``SELECTED`` event still must be handled.
Finally, contrary to most of the other events with the name ending in "ing", ``SELECTING`` event can `not` be vetoed.
.. _GridRangeSelectEvent-events:
|events| Events Emitted by this Class
=====================================
Handlers bound for the following event types will receive a :ref:`wx.grid.GridRangeSelectEvent` parameter.
- EVT_GRID_RANGE_SELECTING: The user is selecting a group of contiguous cells. Processes a ``wxEVT_GRID_RANGE_SELECTING`` event type. This event is available in wxWidgets 3.1.5 and later only.
- EVT_GRID_CMD_RANGE_SELECTING: The user is selecting a group of contiguous cells; variant taking a window identifier. Processes a ``wxEVT_GRID_RANGE_SELECTING`` event type. This event is available in wxWidgets 3.1.5 and later only.
- EVT_GRID_RANGE_SELECTED: The user selected a group of contiguous cells. Processes a ``wxEVT_GRID_RANGE_SELECTED`` event type. This event is available in wxWidgets 3.1.5 and later only and was called ``wxEVT_GRID_RANGE_SELECT`` in the previous versions.
- EVT_GRID_CMD_RANGE_SELECTED: The user selected a group of contiguous cells; variant taking a window identifier. Processes a ``wxEVT_GRID_RANGE_SELECTED`` event type. This event is available in wxWidgets 3.1.5 and later only and was called ``wxEVT_GRID_CMD_RANGE_SELECT`` in the previous versions.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
GridRangeSelectEvent:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.grid.GridRangeSelectEvent.__init__` Default constructor.
:meth:`~wx.grid.GridRangeSelectEvent.AltDown` Returns ``True`` if the Alt key was down at the time of the event.
:meth:`~wx.grid.GridRangeSelectEvent.ControlDown` Returns ``True`` if the Control key was down at the time of the event.
:meth:`~wx.grid.GridRangeSelectEvent.GetBottomRightCoords` Top left corner of the rectangular area that was (de)selected.
:meth:`~wx.grid.GridRangeSelectEvent.GetBottomRow` Bottom row of the rectangular area that was (de)selected.
:meth:`~wx.grid.GridRangeSelectEvent.GetLeftCol` Left column of the rectangular area that was (de)selected.
:meth:`~wx.grid.GridRangeSelectEvent.GetRightCol` Right column of the rectangular area that was (de)selected.
:meth:`~wx.grid.GridRangeSelectEvent.GetTopLeftCoords` Top left corner of the rectangular area that was (de)selected.
:meth:`~wx.grid.GridRangeSelectEvent.GetTopRow` Top row of the rectangular area that was (de)selected.
:meth:`~wx.grid.GridRangeSelectEvent.MetaDown` Returns ``True`` if the Meta key was down at the time of the event.
:meth:`~wx.grid.GridRangeSelectEvent.Selecting` Returns ``True`` if the area was selected, ``False`` otherwise.
:meth:`~wx.grid.GridRangeSelectEvent.ShiftDown` Returns ``True`` if the Shift key was down at the time of the event.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.grid.GridRangeSelectEvent.BottomRightCoords` See :meth:`~wx.grid.GridRangeSelectEvent.GetBottomRightCoords`
:attr:`~wx.grid.GridRangeSelectEvent.BottomRow` See :meth:`~wx.grid.GridRangeSelectEvent.GetBottomRow`
:attr:`~wx.grid.GridRangeSelectEvent.LeftCol` See :meth:`~wx.grid.GridRangeSelectEvent.GetLeftCol`
:attr:`~wx.grid.GridRangeSelectEvent.RightCol` See :meth:`~wx.grid.GridRangeSelectEvent.GetRightCol`
:attr:`~wx.grid.GridRangeSelectEvent.TopLeftCoords` See :meth:`~wx.grid.GridRangeSelectEvent.GetTopLeftCoords`
:attr:`~wx.grid.GridRangeSelectEvent.TopRow` See :meth:`~wx.grid.GridRangeSelectEvent.GetTopRow`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.grid.GridRangeSelectEvent(NotifyEvent)
**Possible constructors**::
GridRangeSelectEvent() -> None
GridRangeSelectEvent(id : int, type : EventType, obj : Object, topLeft :
GridCellCoords, bottomRight : GridCellCoords, sel: bool=True, kbd:
KeyboardState=KeyboardState()) -> None
Events of this class notify about a range of cells being selected.
.. method:: __init__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__init__** `(self)`
Default constructor.
:rtype: `None`
:html:`
`
**__init__** `(self, id : int, type : EventType, obj : Object, topLeft : GridCellCoords, bottomRight : GridCellCoords, sel: bool=True, kbd: KeyboardState=KeyboardState())`
Constructor for initializing all event attributes.
:param `id`:
:type `id`: int
:param `type`:
:type `type`: wx.EventType
:param `obj`:
:type `obj`: wx.Object
:param `topLeft`:
:type `topLeft`: wx.grid.GridCellCoords
:param `bottomRight`:
:type `bottomRight`: wx.grid.GridCellCoords
:param `sel`:
:type `sel`: bool
:param `kbd`:
:type `kbd`: wx.KeyboardState
:rtype: `None`
:html:`
`
.. method:: AltDown(self)
Returns ``True`` if the Alt key was down at the time of the event.
:rtype: `bool`
.. method:: ControlDown(self)
Returns ``True`` if the Control key was down at the time of the event.
:rtype: `bool`
.. method:: GetBottomRightCoords(self)
Top left corner of the rectangular area that was (de)selected.
:rtype: :ref:`wx.grid.GridCellCoords`
.. method:: GetBottomRow(self)
Bottom row of the rectangular area that was (de)selected.
:rtype: `int`
.. method:: GetLeftCol(self)
Left column of the rectangular area that was (de)selected.
:rtype: `int`
.. method:: GetRightCol(self)
Right column of the rectangular area that was (de)selected.
:rtype: `int`
.. method:: GetTopLeftCoords(self)
Top left corner of the rectangular area that was (de)selected.
:rtype: :ref:`wx.grid.GridCellCoords`
.. method:: GetTopRow(self)
Top row of the rectangular area that was (de)selected.
:rtype: `int`
.. method:: MetaDown(self)
Returns ``True`` if the Meta key was down at the time of the event.
:rtype: `bool`
.. method:: Selecting(self)
Returns ``True`` if the area was selected, ``False`` otherwise.
:rtype: `bool`
.. method:: ShiftDown(self)
Returns ``True`` if the Shift key was down at the time of the event.
:rtype: `bool`
.. attribute:: BottomRightCoords
See :meth:`~wx.grid.GridRangeSelectEvent.GetBottomRightCoords`
.. attribute:: BottomRow
See :meth:`~wx.grid.GridRangeSelectEvent.GetBottomRow`
.. attribute:: LeftCol
See :meth:`~wx.grid.GridRangeSelectEvent.GetLeftCol`
.. attribute:: RightCol
See :meth:`~wx.grid.GridRangeSelectEvent.GetRightCol`
.. attribute:: TopLeftCoords
See :meth:`~wx.grid.GridRangeSelectEvent.GetTopLeftCoords`
.. attribute:: TopRow
See :meth:`~wx.grid.GridRangeSelectEvent.GetTopRow`