Floodgauge
A progressbar with the amount written inside the bar — "Copying 64%" — for operations where the number matters as much as the bar.
Live preview
Live preview. In the Player's built-in docs viewer (
scriptweaver --help), this rendersFloodgaugeas a live, theme-aware widget you can interact with.
Example
const fg = app.Floodgauge({ mask: 'Copying %d%%', length: 320 });
fg.pack.configure({ fill: 'x' });
fg.value = 64; // bar and text move together
Options
| Option | Type | Description |
|---|---|---|
value |
number | The current amount. |
maximum |
number | Scale end (default 100). |
variable |
DoubleVar |
The backing variable; the bar follows every write. |
mask |
string | A format spec for one integer, e.g. '%d%%' (default) or 'Step %d of 9'. Invalid masks error immediately. |
length |
number | The bar's long-axis size in pixels. |
orient |
string | 'horizontal' (default) or 'vertical'; creation-time only. |
interactive |
boolean | When true, the bar becomes an input: click/drag along it and arrow keys set the value through the same variable. Default false. |
stepSize |
number | Keyboard increment when interactive (default 1). |
By default the bar is display-only and its accessible role is progressbar. Set
interactive: true to make it an input: a click or drag along the bar sets the
value (bottom-up when vertical), the arrow keys adjust by stepSize, and
Home/End jump to the ends — all flowing through the same value / variable
(so a bound DoubleVar updates, exactly like a Scale), and the
accessible role becomes slider. Everything else a
Progressbar accepts is delegated.