.. include:: headings.inc .. _SpinEvent: ========================================================================================================================================== |phoenix_title| **SpinEvent** ========================================================================================================================================== This event class is used for the events generated by :ref:`SpinButton` and :ref:`SpinCtrl`. .. _SpinEvent-events: |events| Events Emitted by this Class ===================================== Handlers bound for the following event types will receive a :ref:`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 ``UP`` or ``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:`SpinButton` and :ref:`SpinCtrl` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **SpinEvent** .. raw:: html

Inheritance diagram of SpinEvent

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