# `wxSpinEvent`
[🔗](https://github.com/erlang/otp/blob/OTP-29.0.3/lib/wx/src/gen/wxSpinEvent.erl#L58)

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

See:
* `m:wxSpinButton`

* `m:wxSpinCtrl`

This class is derived, and can use functions, from:

* `m:wxNotifyEvent`

* `m:wxCommandEvent`

* `m:wxEvent`

wxWidgets docs: [wxSpinEvent](https://docs.wxwidgets.org/3.2/classwx_spin_event.html)

## Events

Use `wxEvtHandler:connect/3` with `wxSpinEventType` to subscribe to events of this type.

# `wxSpin`

```erlang
-type wxSpin() :: #wxSpin{type :: wxSpinEvent:wxSpinEventType(), commandInt :: integer()}.
```

# `wxSpinEvent`

```erlang
-type wxSpinEvent() :: wx:wx_object().
```

# `wxSpinEventType`

```erlang
-type wxSpinEventType() :: command_spinctrl_updated | spin_up | spin_down | spin.
```

# `getPosition`

```erlang
-spec getPosition(This) -> integer() when This :: wxSpinEvent().
```

Retrieve the current spin button or control value.

# `setPosition`

```erlang
-spec setPosition(This, Pos) -> ok when This :: wxSpinEvent(), Pos :: integer().
```

Set the value associated with the event.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
