Table 7–6: Slider Syntax
Element
|
Description
|
MAX-VALUE
|
Specify the MAX-VALUE keyword and an integer constant to set the upper limit of the slider’s range.
Consider using the MAX-VALUE option with the LARGE-TO-SMALL option to indicate that the slider’s maximum value displays first.
|
MIN-VALUE
|
Specify the MIN-VALUE keyword and an integer constant to set the lower limit of the slider’s range. You can use the MAX-VALUE and MIN-VALUE options with the LARGE-TO-SMALL option to indicate that the slider’s maximum value displays first and that the minimum value displays last as the pointer moves along the slider’s trackbar.
|
HORIZONTAL VERTICAL
|
Sliders have horizontal orientation by default. The keyword VERTICAL defines a slider with vertical orientation.
If the orientation is VERTICAL, the slider displays with the minimum value at the bottom and the maximum value at the top. The user can change this value by moving the pointer in the trackbar up or down. If the orientation is HORIZONTAL, the slider displays with the minimum value at the left and the maximum value at the right. The user can change the value by moving the pointer in the trackbar left or right.
|
NO-CURRENT-
VALUE
|
The default is to display the current value for a given position on the slider ’s trackbar. The NO-CURRENT-VALUE option allows you to override this default behavior to indicate that the slider will not automatically display its current value.
|
LARGE-TO-
SMALL
|
The default numeric range that a slider displays is small (minimum) to large (maximum). The LARGE-TO-SMALL option allows you to override this default behavior as follows:
When the slider is positioned horizontally, the left most position on the trackbar displays the maximum value and the right most position displays the minimum value.
When the slider is positioned vertically, the bottom most position on the trackbar displays the maximum value and the top most position displays the minimum value.
|
TIC-MARKS
|
Enables short hash marks to display on the outside of the trackbar to help define the movement of the pointer in the trackbar. The default is not to display tic marks. However, if you want to define tic marks, you must also specify on which side, or sides, of the trackbar you want tic marks to display by using the additional TOP, BOTTOM, LEFT, RIGHT, or BOTH qualifying options.
|
FREQUENCY
|
This option is used only with the TIC-MARKS option to indicate how often tic marks will display. For example, if you indicate a frequency of 5, a tic mark displays in every fifth position along the track bar.
|
size-phrase
|
The size phrase has a few different syntaxes. The tutorial uses the most portable syntax:
SIZE-CHARS width BY height
where width and height are integer constants.
If the slider has horizontal orientation, the height has to accommodate the trackbar, pointer, and labels. For character interfaces, the width should be a multiple or factor of the range to ensure that the pointer moves in even increments.
If the slider has vertical orientation, the width has to accommodate the label. The height should be a multiple or factor of the range to ensure that the pointer moves in even increments.
|
TOOLTIP tooltip
|
You can optionally define a text message string that automatically displays when the mouse pointer pauses over the slider.
|