ValueEdit
File: Rhapsodist/Core/Widgets/ValueEdit.js · Namespace: ValueEdit.
Overview
ValueEdit turns a plain panel into a numeric “value edit box”: a styled background, a centred knob showing text only, and two step buttons that nudge its value by stepSize.
Used for compact numeric controls like Coarse/Fine Tune and Transpose on the Instrument settings page (pnlCoarseTune, pnlFineTune, pnlTranspose in ShellLayout).
Usage
In practice you rarely call ValueEdit.create() directly: SettingsPanel detects and converts eligible child panels automatically. To add a new tuning-style setting, give it a panel containing a single ScriptSlider child, inside a panel already managed by SettingsPanel.
Called directly:
const pnlMyValueEdit = ValueEdit.create("pnlMyValueEdit", {});
Options
Every key in options is copied onto the panel’s data object.
Public API
| Function | Description | Returns |
|---|---|---|
create(panelId: string, options: JSON) | Builds the styled background, knob, and step buttons. | ScriptObject |
Broadcasters
| Broadcaster | Description |
|---|---|
panel.data.bc | The panel’s or its knob’s enabled property changes. Used internally to keep the step buttons’ enabled state in sync with the control they belong to. |
Internal Reference
| Function | Description | Returns |
|---|---|---|
createButtons(panel: ScriptObject) | Builds the up/down step buttons and wires their mouse callbacks to nudge the knob’s value by its stepSize, clamped to the knob’s min/max. | Array |