UserGuide

iOS Slider

From Xojo Documentation

Revision as of 19:08, 4 February 2019 by PLefebvre (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Slider control provides an interface that is used for increasing or decreasing a numeric value. The Slider can only be displayed horizontally.

You can use the Set Default Value feature to set the default position of the slider.

iOS Slider Library Icon

Below is a list of commonly used events and properties. Refer to iOSSlider in the Language Reference for the complete list.

Events

ValueChanged

Called when the Slider value changes, either by the user adjusting the Slider or by code changing its Value property.

Properties

Enabled

A boolean that indicates if the slider is enabled and can be adjusted or disabled and cannot be adjusted.

MaxValue

The maximum Double value for the slider.

MinValue

The minimum Double value for the slider.

Value

An Double value that indicates the position of the Slider. If Value is assigned a value less than MinValue, then MinValue is used. If Value is assigned a value greater than MaxValue, then MaxValue is used.

Usage

iOS Slider

To have a Slider update a Label with its Value as the Slider is adjusted, you can put this code in the Slider's ValueChanged event handler:

SliderLabel.Text = Me.Value.ToText

See Also

iOSSlider class; UserGuide:iOS UI topic