SpinBox
class in package klyn.gui.windows

    public class SpinBox extends Widget:

Widget
└ SpinBox

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))

Properties

Modifier and Type | Member | Description
--- | --- | ---
public property | maximum `maximum as Int = 100` | Highest allowed value.
public property | minimum `minimum as Int = 0` | Lowest allowed value.

Inherited Properties
property Inherited Properties from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, cursor, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isTabStop, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, resolvedStyleCache, resolvedStyleCacheAppearanceMode, resolvedStyleCacheFont, resolvedStyleCacheRevision, resolvedStyleCacheStateKey, resolvedStyleCacheStyleClass, resolvedStyleCacheZoomRevision, right, size, sizePolicy, styleClass, toolTip, width, window, x, y
Signals

Modifier and Type | Member | Description
--- | --- | ---
public signal property | value `value as Int:` | Current value clamped between `minimum` and `maximum`.

Inherited Events
event Inherited Events from Widget: keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | SpinBox `SpinBox(value as Int = 0, minimum as Int = 0, maximum as Int = 100):` | Creates a spin box with an initial value and range.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | adjustValueBy `adjustValueBy(delta as Int) as Void:` | Adjusts the value by a signed delta.
public | beginEdit `beginEdit() as Void:` | Starts manual keyboard edition of the numeric field.
public | cancelEdit `cancelEdit() as Void:` | Cancels manual edition and keeps the current numeric value.
public | clampValue `clampValue(value as Int) as Int:` | Clamps a value into the configured range.
public | clearEdit `clearEdit() as Boolean:` | Clears the manual edit buffer.
public | commitEdit `commitEdit() as Void:` | Commits the manual edit buffer if it contains a valid integer.
public | deleteBackward `deleteBackward() as Boolean:` | Deletes the last manually edited character.
public | insertText `insertText(text as String) as Boolean:` | Inserts keyboard text into the spin box edit buffer.
public override | paint `paint(painter as Painter) as Void:` | Paints the spin box field and stepper affordance.
public | setValue `setValue(value as Int) as Void:` | Updates the current value and notifies bindings when it changes.

Inherited Methods
method Inherited Methods from Widget: blur, containsPoint, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintClipped, paintOverlay, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds