# wxSpinEvent Class Reference
[Events]

`#include </home/work/projects/wx/2.9/wx/interface/wx/spinbutt.h>`

Inheritance diagram for wxSpinEvent:
[legend]

## Detailed Description

This event class is used for the events generated by wxSpinButton and wxSpinCtrl.

## Events using this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxSpinEvent& event)

Event macros:

- EVT_SPIN(id, func):
  Generated whenever an arrow is pressed.
- EVT_SPIN_UP(id, func):
  Generated when left/up arrow is pressed.
- EVT_SPIN_DOWN(id, func):
  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.

##

Library: wxCore
Category: Events

See also:
  wxSpinButton and wxSpinCtrl

## Public Member Functions

| wxSpinEvent (wxEventType commandType=wxEVT_NULL, int id=0)
| The constructor is not normally used by the user code.
int | GetPosition () const
| Retrieve the current spin button or control value.
void | SetPosition (int pos)
| Set the value associated with the event.

List of all members.

## Constructor & Destructor Documentation

wxSpinEvent::wxSpinEvent | ( | wxEventType | commandType = `wxEVT_NULL`,
|  | int | id = `0` |
| ) |  |  |

The constructor is not normally used by the user code.

## Member Function Documentation

int wxSpinEvent::GetPosition | ( |  | ) | const

Retrieve the current spin button or control value.

void wxSpinEvent::SetPosition | ( | int | pos | ) |

Set the value associated with the event.

|  | [ top ]