Slider Control

This document covers the following topics:


Description

A slider control is akin to the sliders often found on sound mixers or graphic equalizers. It consists of a slider, often referred to as the thumb, that can be moved along a linear track.

The SLIDER attribute can be used to set or query the thumb position, which represents the control's current value, and can be any integer value within the slider's range, as defined by the control's MIN and MAX attributes. Hence the slider range also determines the number of possible slider positions. In order to be able to move the thumb, a non-zero slider range must be defined.

The thumb's track may be oriented vertically if the "Vertical (v)" STYLE is set, otherwise it is oriented horizontally. The thumb can be moved by either dragging the thumb, clicking on the slider track on either side of the thumb, or using the cursor or Page Up or Page Down keys. If the thumb is dragged, the "Position tip (p)" STYLE determines whether or not a tooltip window should appear in order to display the current position. Otherwise, the LINE and PAGE attributes can be used to specify the number of positions the thumb should be moved in the respective cases.

Depending on the setting of the control's "Side 1 ticks (1)" and "Side 2 ticks (2)" STYLE flags, tick marks are either not displayed at all, or are displayed on either or both sides of the skider track. Note that the tick marks at the each end of the track are always present. If the "Auto ticks (a)" STYLE is set, tick marks (if shown) are automatically displayed at regular intervals, as determined by the SPACING attribute (defaults to 1, implying a tick mark at every position). Without this style, the tick marks (apart from the implicit tick marks at either end of the range), if desired, must be set manually via the SET-TICKS action. These ticks marks can be removed again via the CLEAR-TICKS action.

marks can be removed again via the CLEAR-TICKS action. When the slider is moved, a Change Event is raised (if not suppressed) for the control, and the control's MODIFIED attribute is implicitly set.

Attributes for Slider Control

Attribute Name Query Set/Modify In Attr. Window
CLIENT-DATA X X/X  
CLIENT-HANDLE X X/X  
CLIENT-KEY X X/X  
CLIENT-VALUE X X/X  
CONTEXT-MENU X X/X X
DIL-TEXT X X/X X
ENABLED X X/X X
FIRST-CHILD X -/-  
FOLLOWS X X/X  
HAS-TOOLTIP X X/- X
HELP-ID X X/X X
LAST-CHILD X -/-  
LINE X X/X X
MAX X X/X X
MIN X X/X X
MODIFIED X X/X  
MODIFIED-SUCCESSOR X -/-  
OWNER X X/-  
PAGE X X/X X
PARENT X X/-  
PREDECESSOR X -/-  
RECTANGLE-H X X/X X
RECTANGLE-W X X/X X
RECTANGLE-X X X/X X
RECTANGLE-Y X X/X X
SLIDER X X/X X
SPACING X X/X X
STYLE X X/- X
SUCCESSOR X X/-  
SUPPRESS-CHANGE-EVENT X X/X  
SUPPRESS-CONTEXT-MENU-EVENT X X/X  
TYPE X X/-  
VISIBLE X X/X X

Events

Change Event, Context-Menu Event (all events may be suppressed).