This is an old revision of the document!
Sliders are much like Gauges, except they also allow for interaction by the user (rather than just showing a level).
To implement a slider in guiDesigner:
Whats the difference between a gauge and a slider?
Good question! A gauge takes a reading from a device/system, and displays the level as a visualisation. A slider is a control that the user can manipulate to change the level of the device/system.
To access the slider properties, right click on the slider and choose Slider Properties
.
The analog join assigned to a slider is used to adjust the slider level. Analog joins have a range of 0 to 65535, which is represented in a slider as 0 = slider empty, 65535 = slider full.
If the slider is assigned an analog join above zero, the join value will also change when the slider level is changed, resulting in other GUI objects using the same analog join to reflect the new level also.
By default the slider will be assigned an analog join of zero. Before the slider can show any feedback in the form of the slider level, it must be assigned an analog join above zero.
By assigning a digital join to a slider, you can make it also act like a momentary button. The digital join will go high (1) when the slider is first pressed, then go low (0) again when released.
If the slider is assigned a digital join above zero, the join state will also change when the slider is pressed/released, resulting in other GUI objects using the same digital join to reflect the new state also.
By default the slider will be assigned a digital join of zero.
When a slider is set to simulation mode, it will change state when manipulated by the user. If simulation is not enabled on the slider, the slider will only change state when it's assigned analog join changes value.
Use this slider to change the slider fill level in the preview window.
Select the slider theme you would like to use. This choice is derived from the gauge/slider themes you have defined in your project within the Theme Manager.
Check this box to fill the slider in reverse. E.g. fill the slider from the right to left for horizontal sliders (or from top to bottom in the case of a vertical slider).
These settings control two things:
[sliderval]
token.Min
: the minimum value of the slider range. Default is 0
.Max
: the maximum value of the slider range. Default is 100
.Decimals
: the number of decimal values to include in the value. Defaults to 0
which means don't show any decimal values.This option allows for manual entry of the position and size of the slider.
The width and height of a gauge determines if the gauge is rendered in horizontal or vertical mode. When the height is greater than the width, the gauge will render in vertical mode (filling bottom to top). Otherwise, it will be deemed a horizontal gauge (filling left to right).
Points 9 - 11 cover both the Inactive and Active tabs as they have the same configurable properties. Choose which tab you want to edit. Inactive will allow you to edit the slider in its non-pressed state. Active will allow you to edit the button in its pressed state.
This windows shows how the slider will look in your GUI, showing the value as set in the Preview Value.
Choose a command that you have previously defined in the System Manager to each slider action.