Panel: slider

Syntax

{<name>:} slider <start>,<finish> {,<value>}

Description

Slider sub-panel. A horizontal or vertical bar with an internal button which can be interactively moved by the mouse to change a numeric value within a given range. The current value is displayed as the value changes.

Membership

Parameters

Switches

Callbacks

Called while the slider is being dragged with mouse button 1 down.

<panel>.drag(<window>,<panel>{,<row>})

Called when mouse button 1 is released.

<panel>.exec(<window>,<panel>{,<row>})

Notes

Switches -j, -pj, -x and -y apply only to sliders within a panel window. Sliders within other windows and menupanes cannot have a user-defined position or justification.

Examples

Create a panel window containing a row of two horizontal sliders both of default size.

window w = wpanel {
    row {
        s1: slider 0,100,10,-tc=red
        s2: slider 10,0,1,-dp=2
    }
}

Create a panel window containing a vertical read-only slider of specified length.

window w = wpanel {
    s: slider 500,1000,-out,-fo=big_xfont,-h=300,-v
}