public class SpinBox extends Widget:
Numeric spin box widget.
value is a signal property, so it can be bound directly to another control without exposing a separate valueChanged event.
spin = SpinBox(value=42, minimum=0, maximum=255) Binding.watch(spin::value, lambda(value: Object): print(value))
| Modifier and Type | Member | Description |
|---|---|---|
| public property | maximummaximum as Int = 100 |
Highest allowed value. |
| public property | minimumminimum as Int = 0 |
Lowest allowed value. |
| public signal property | valuevalue as Int: |
Current value clamped between minimum and maximum. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | SpinBox | Creates a spin box with an initial value and range. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | adjustValueByadjustValueBy(delta as Int) as Void: |
Adjusts the value by a signed delta. |
| public | beginEditbeginEdit() as Void: |
Starts manual keyboard edition of the numeric field. |
| public | cancelEditcancelEdit() as Void: |
Cancels manual edition and keeps the current numeric value. |
| public | clampValue | Clamps a value into the configured range. |
| public | clearEditclearEdit() as Boolean: |
Clears the manual edit buffer. |
| public | commitEditcommitEdit() as Void: |
Commits the manual edit buffer if it contains a valid integer. |
| public | deleteBackwarddeleteBackward() as Boolean: |
Deletes the last manually edited character. |
| public | insertText | Inserts keyboard text into the spin box edit buffer. |
| public override | paintpaint(painter as Painter) as Void: |
Paints the spin box field and stepper affordance. |
| public | setValuesetValue(value as Int) as Void: |
Updates the current value and notifies bindings when it changes. |