Please enable JavaScript to view this site.

ESL Documentation

Definition

Define a slider.

[enabled|disabled] [visible|invisible]

[editable|readonly]

{horizontal|vertical}

slider SLIDER_NAME

size WIDTH HEIGHT at [position] X Y in DB_NAME

[parameter is PAR_STRING]

[helpid is HELP_ID]

[group is GROUP_NAME]

[{left|bottom|right|top} home]

[{top|right|bottom|left} range is LOW HIGH]

[insert ticks every TICK_OFFSET [from LOW_INCREMENT thru

HIGH_INCREMENT] size TICK_SIZE

enabled | disabled

Define the slider as selectable or not. If you define a slider as disabled, it is displayed grayed and cannot be selected. The default is enabled.

Query using: is enabled, selectability of

Modify using: enable, disable

visible | invisible

A visible object is displayed when it is defined. An invisible object is not displayed until you specifically make it visible. The default is visible.

Query using: is visible, visibility of

Modify using: make visible, make invisible

editable | readonly

Make the slider editable or read-only. When a slider is editable, a user can change the value represented by the slider in the following ways:

Use the arrow keys.

Page Up and Page Down keys.

Drag the slider arm with the mouse.

Click on arrow buttons located to one side of the slider.

Left click on the shaft to move the arm to the click position.

Right click on the shaft to move the arm one increment.

When a slider is read-only, a user cannot alter the slider. Read-only sliders are useful as gauges or indicating devices. The default is editable.

horizontal | vertical

Orient the slider horizontally or vertically. This attribute must be specified.

SLIDER_NAME

The identifier for a slider.

size WIDTH HEIGHT

Integer values representing the dimensions of the slider in dialog units.

Query using: xsize of, ysize of

Modify using: change size

at position X Y

Integer values representing the position of the slider in dialog units.

Query using: xposition of, yposition of

Modify using: change position

DB_NAME

The identifier for the dialog box or dialog region parent object.

Query using: ancestry of

parameter is PAR_STRING

A string value representing the parameter of the slider. The default parameter string is "".

Query using: parameter of

Modify using: make parameter

helpid is HELP_ID

A string or integer value representing the identifier of the help panel you want displayed when the user requests help for this slider. This should match the help panel defined in the library specified by the help library declaration. The default HELP_ID is "".

Query using: helpid of

Modify using: make helpid

group is GROUP_NAME

An identifier for the group of dialog control objects to which the slider belongs.

left | bottom | right | top home

Position the slider arm initially in a home position. The low value of a slider's range is also located in this position. The left and right positions are valid for horizontal sliders only, the default being left. The top and bottom positions are valid for vertical sliders only, the default being bottom.

top | right | bottom | left range is LOW HIGH

Position the range for the slider. For horizontal sliders, position the range on the top or bottom of the slider shaft, top being the default. For vertical sliders, position the range to the left or right of the slider shaft, right being the default.

Also specify the low and high value for the slider's range. The range is set in increments of one. The default low value is 0; the default high value is 10.

insert ticks every TICK_OFFSET

An integer value that sets the offset between tick marks along the slider's scale.

from LOW_INCREMENT thru HIGH_INCREMENT

Integer values that set the position for the first and last tick mark.

size TICK_SIZE

An integer value defining the size in dialog units of each tick mark. A size of zero will result in all tick marks being removed.

Description

A slider is a dialog control and must have a dialog box or dialog region as its parent.

Only the slider keyword, either horizontal or vertical, the identifier, the at specification, the size specification, and in DB_NAME are required in the definition, in the order shown in the model.

Note that the insert statement(s), if there are any, must come last in the slider definition.

The scale (range) of a slider is always defined in increments of one. If a different type of scale is required, the ESL application must convert to and from the desired values.

The response, response to slider, is triggered each time the value of a slider changes. A response will not be triggered as the user drags the slider arm with the mouse, but only after the arm is finally positioned.

All the attributes of a slider are maintained when it is made temporary and permanent. When a save program as action is executed, the current state of the slider, including all attributes and data, is saved.

Example

# This slider simulates a Celsius thermometer.

# It will have ticks with placed at ten degree increments.

 

enabled visible readonly vertical slider Temperature_SL

    size 60 200 at 10 10 in Weather_DB

    bottom home

    right range is 0 100

    insert ticks every 10 from 0 thru 100 size 10

See Also

insert ticks Action Statement