Slider
Component Palette Icon
The slider component lets the user drag an indicator along a scale to choose a value in a range. The slider can be configured to orient horizontally or vertically.
Properties
Name | Description | Property Type | Scripting | Category |
---|---|---|---|---|
Antialias | Draw with antialias on? Makes text smoother. | boolean | .antialias | Appearance |
Background Color | The background color of the component. | Color | .background | Appearance |
Border | The border surrounding this component. NOTE that the border is unaffected by rotation. | Border | .border | Common |
Cursor | The mouse cursor to use when hovering over this component. | int | .cursorCode | Common |
Data Quality | The data quality code for any tag bindings on this component. | int | .dataQuality | Data |
Defer Updates | Only publish updates to value when not actively being changed. | boolean | .deferred | Behavior |
Enabled | If disabled, a component cannot be used. | boolean | .componentEnabled | Common |
Font | Font of text on this component. | Font | .font | Appearance |
Foreground Color | The foreground color of the component. | Color | .foreground | Appearance |
Horizontal Slider | If true, slider is horizontal, otherwise, it's vertical. | boolean | .horizontal | Appearance |
Inverted? | Specify true to reverse the value range shown for the slider and false to put the value range in the normal order. | boolean | .inverted | Behavior |
Major Tick Spacing | The distance, measured in values, between each major tick mark. | int | .majorTickSpacing | Appearance |
Maximum Value | The value when the slider is all the way right or up. | int | .maximum | Data |
Minimum Value | The value when the slider is all the way left or down. | int | .minimum | Data |
Minor Tick Spacing | The distance, measured in values, between each minor tick mark. | int | .minorTickSpacing | Appearance |
Mouseover Text | The text that is displayed in the tooltip which pops up on mouseover of this component. | String | .toolTipText | Common |
Name | The name of this component. | String | .name | Common |
Paint Labels? | If true, value labels will be shown. | boolean | .paintLabels | Appearance |
Paint Ticks? | If true, value tick marks will be shown. | boolean | .paintTicks | Appearance |
Paint Track? | If true, the track of the slider will be shown. | boolean | .paintTrack | Appearance |
Snap To Ticks? | Only allows selection of values at the tick marks. | boolean | .snapToTicks | Behavior |
Styles | Contains the component's styles. | Dataset | .styles | Appearance |
Value | The current value of the slider. | int | .value | Data |
Visible | If disabled, the component will be hidden. | boolean | .visible | Common |
Scripting
Scripting Functions
This component does not have scripting functions associated with it.
Extension Functions
This component does not have extension functions associated with it.
Event Handlers
Event handlers allow you to run a script based off specific triggers. See the full list of available event handlers on the Component Events page
Customizers
Examples
Code Snippet
#The following code will return the value of the slider's previous value into a variable.
#This code is fired on the property change scripting for this component.
oldValue = event.source.oldValue
Vertical Slider with Border and Blue Text
Property Type | Value |
---|---|
Maximum Value | 250 |
Minor Tick Spacing | 25 |
Foreground Color | 0,0,255 |
Major Tick Spacing | 50 |
Horizontal Slider without Tickmarks
Property Type | Value |
---|---|
Paint Ticks? | False |
Minor Tick Spacing | 0 |
Major Tick Spacing | 100 |