Spinbox

A themed value entry with up / down steppers.

Live preview

Try the Theme switcher in the toolbar — this preview restyles live:

Live preview. In the Player's built-in docs viewer (scriptweaver --help), this renders Spinbox as a live, theme-aware widget you can interact with.

Example

const qty = app.Spinbox({ from: 1, to: 99 });
qty.value = '1';
qty.pack.configure({ padx: 16, pady: 8 });

console.log(parseInt(qty.value, 10));

Options

Option Type Description
from / to number The value range.
increment number Step size for the arrows.
values list A fixed set of choices instead of a numeric range.
format string A printf-style format for the displayed number.
state string 'normal', 'readonly', or 'disabled'.
wrap boolean Whether the value wraps past the ends.
textVariable a *Var Bind the current value.
style string A ttk style name (TSpinbox only).

Methods

Spinbox shares the Entry text methods:

Method Description
value Property: get or set the current value (a string).
insert / delete / clear / getText As for Entry.

Plus the inherited widget methods — see Widget basics.

See also