.. 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.SpinEvent:
==========================================================================================================================================
|phoenix_title| **wx.SpinEvent**
==========================================================================================================================================
This event class is used for the events generated by :ref:`wx.SpinButton` and :ref:`wx.SpinCtrl`.
.. _SpinEvent-events:
|events| Events Emitted by this Class
=====================================
Handlers bound for the following event types will receive a :ref:`wx.SpinEvent` parameter.
- EVT_SPIN: Generated whenever an arrow is pressed.
- EVT_SPIN_UP: Generated when left/up arrow is pressed.
- EVT_SPIN_DOWN: Generated when right/down arrow is pressed.
Note that if you handle both ``SPIN`` and ``wx.UP`` or ``wx.DOWN`` events, you will be notified about each of them twice: first the UP/DOWN event will be received and then, if it wasn't vetoed, the ``SPIN`` event will be sent.
.. seealso:: :ref:`wx.SpinButton` and :ref:`wx.SpinCtrl`
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
SpinEvent:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.SpinEvent.__init__` The constructor is not normally used by the user code.
:meth:`~wx.SpinEvent.GetPosition` Retrieve the current spin button or control value.
:meth:`~wx.SpinEvent.SetPosition` Set the value associated with the event.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.SpinEvent.Position` See :meth:`~wx.SpinEvent.GetPosition` and :meth:`~wx.SpinEvent.SetPosition`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.SpinEvent(NotifyEvent)
**Possible constructors**::
SpinEvent(commandType: EventType=wxEVT_NULL, id: int=0) -> None
This event class is used for the events generated by SpinButton and
SpinCtrl.
.. method:: __init__(self, commandType: EventType=wxEVT_NULL, id: int=0)
The constructor is not normally used by the user code.
:param `commandType`:
:type `commandType`: wx.EventType
:param `id`:
:type `id`: int
:rtype: `None`
.. method:: GetPosition(self)
Retrieve the current spin button or control value.
:rtype: `int`
.. method:: SetPosition(self, pos : int)
Set the value associated with the event.
:param `pos`:
:type `pos`: int
:rtype: `None`
.. attribute:: Position
See :meth:`~wx.SpinEvent.GetPosition` and :meth:`~wx.SpinEvent.SetPosition`