HTBasic Help
×
Menu
Index

Slider Widget

 
_______________________________________________________
SLIDER Widget
Provides a slider pad that moves in a trough from a minimum value to a maximum value
_______________________________________________________
 
Legal Usage                Level-0 Widget:                Yes
                 Parent to:                None
                 Child of:                        PANEL
 
Example Image
 
     
 
Example Program
 
See SLIDER Widget for a program that provides a display similar to that
shown above.
 
NOTE
 
See the following programs for other examples using the SLIDER widget:
 
         Bar Meter Limits
         Environmental Chamber
         Hammer Game
         METER/SLIDER Widgets
         PID Controller
         SLIDER Test
 
Attributes
 
See SLIDER Widget Attributes for the SLIDER widget attribute list.
 
Remarks
 
The SLIDER widget is used to display and set a numeric value with a slider pad that moves in a trough from a minimum value to a maximum value.The SLIDER widget is used to display and set a numeric value in the style of an audio mixing-panel slider. For a vertical slider, the maximum value is at the top. For a horizontal slider, the maximum value is at the right.
 
You can use the mouse to move the slidebar in the center of the SLIDER widget. The value on the slidebar will change to reflect its position along the scale of minimum to maximum, and the event generated in this program will DISP that value.
 
You can change maximum range as required, using the MINIMUM and MAXIMUM attributes. You can click the mouse on the arrows at the ends of the scale and the slidebar will move in the appropriate direction by the MINOR INCREMENT setting. Click on the scale between an arrow and the slidebar, and the slidebar will move in that direction by the MAJOR INCREMENT setting.
 
You can change the MINOR INCREMENT and MAJOR INCREMENT setting from their defaults of 1 and 10 as required. If you click at the ends of the scale, the SLIDER only increments once. You can use AUTO REPEAT to allows the SLIDER to increment as long as the mouse button is depressed (or the slider runs into the end). You can also move the slidebar using these keys:
 
Key(s)
Action
Up Arrow/Right Arrow
Increment by MINOR INCREMENT
Down Arrow/Left Arrow
Decrement by MINOR INCREMENT
Shift-Up Arrow/Shift-Right Arrow
Move to MAXIMUM
Shift-Down Arrow/Shift-Left Arrow
Move to MINIMUM
Prev
Decrement by MAJOR INCREMENT
Next
Increment by MAJOR INCREMENT
 
If DIRECT MOVE is set to 1, when you click on the space between an arrow and the slidebar the slidebar will move directly to that position. DIRECT MOVE disables MAJOR INCREMENT.
 
You can set LOGARITHMIC to 1 and the slidebar will increment in a logarithmic fashion. You can set ORIENTATION to HORIZONTAL as an alternative to the default orientation of VERTICAL, and the SLIDEBAR will have a horizontal format. You can turn the limits boxes on and off and specify (to an extent) numeric formats.
 
Events
 
Events for the SLIDER widget are:
 
·
CHANGED
·
DONE
·
SYSTEM MENU
 
CHANGED
 
This event is generated every time the user changes the VALUE by clicking on arrows or in trough or by clicking and dragging the slider.
 
DONE
 
This event is generated only when the user releases the mouse button.
 
SYSTEM MENU
 
This event is generated when the operator selects items from the SYSTEM MENU.