Pager
File: Rhapsodist/Widgets/Pager.js · Namespace: Pager.
Overview
A tabbed-page mechanism, similar in effect to SwitcherPanel but driven by an existing HISE radio-group button set rather than a value-bearing switcher component.
Any ScriptButton children of buttonContainerId are treated as tab buttons, and any other direct children of panelId are treated as pages, one per button index. Clicking a button shows the matching page and hides the rest.
SwitcherPanel is a more versatile alternative.
Usage
Does not add any components itself; build the buttons and pages first, then call create().
// Buttons in pnlTabButtons (radio group 1) select which child page of pnlPages is visible
const pnlPages = Pager.create("pnlPages", "pnlTabButtons", 1, {});
Options
options is accepted but not currently used.
Public API
| Function | Description | Returns |
|---|---|---|
create(panelId: string, buttonContainerId: string, radioGroup: number, options: JSON) | Wires up an existing button set as tab controls for an existing set of page panels. | ScriptObject |
Broadcasters
| Broadcaster | Description |
|---|---|
data.broadcasters.buttonWatcher | Fires whenever a button in the radio group changes value; drives the tab buttons’ values and the pages’ visibility directly. Available for an expansion to attach its own listener to the same value change. |