This shows you the differences between two versions of the page.
|
software:gui-designer:sliders [2013/03/22 05:44] jarrod |
software:gui-designer:sliders [2013/05/01 11:28] (current) jarrod |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| Sliders are much like [[software:gui-designer:gauges|Gauges]], except they also allow for interaction by the user (rather than just showing a level).\\ | Sliders are much like [[software:gui-designer:gauges|Gauges]], except they also allow for interaction by the user (rather than just showing a level).\\ | ||
| - | {{:sliderdemo.mp4|}} | + | {{:sliderdemo2.mp4|236x90}} |
| To implement a slider in guiDesigner: | To implement a slider in guiDesigner: | ||
| Line 53: | Line 53: | ||
| * ''Max'': the maximum value of the slider range. Default is ''100''. | * ''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. | * ''Decimals'': the number of decimal values to include in the value. Defaults to ''0'' which means don't show any decimal values. | ||
| + | |||
| + | <WRAP center round important 80%> | ||
| + | It is VERY important to note that these ''Min'', ''Max'' and ''Decimals'' properties only relate to outgoing data.\\ | ||
| + | The range of 0-65535 is always required when SETTING a sliders level. | ||
| + | </WRAP> | ||
| + | |||
| === 8 - Position === | === 8 - Position === | ||
| Line 106: | Line 112: | ||
| === 13 - System Commands === | === 13 - System Commands === | ||
| Choose a command that you have previously defined in the System Manager to each slider action. | Choose a command that you have previously defined in the System Manager to each slider action. | ||
| + | |||
| + | Any command attached to a slider can make use of the ''[sliderval]'' [[software:gui-designer:tokens#attached-to-sliders|token]] within the command value. This token will be replaced with the current value of the slider, as per the min and max indicator value settings. | ||
| === 14 - Slider Value === | === 14 - Slider Value === | ||
| + | The value that the ''[sliderval]'' [[software:gui-designer:tokens#attached-to-sliders|token]] is replaced with can be forced into one of the following formats: | ||
| + | * ''Dec'' (decimal): Send the value as a decimal value (within the range of min and max properties, with the specified number of decimal places). | ||
| + | * ''Hex'' (hexadecimal): Send the value in hex format, using the minimum number of hex bytes required to represent the current slider value. | ||
| + | * ''Hex String'' (hexadecimal string): Send the value in an ascii representation of hex format, using the minimum number of hex bytes required to represent the current slider value. | ||
| + | |||
| + | The ''[sliderval]'' token can be further manipulated by using ''Dec'' mode, and [[software:gui-designer:math-expressions|math expressions]] within the command value. For example ''%%{{[sliderval]::%02.0f}}%%'' would result in a slider value of ''8'' being sent as ''08''. | ||