Slider State Properties

EnableSelection

The EnableSelection property sets or gets whether the user can select a range or just a single number with a slider. If this property is set, the user can drag-select a portion of the slider's range in reverse video and select it with the pointer.

bMode = Slider.EnableSelection
Slider.EnableSelection = bMode

Element

Description

bMode

True indicates that a portion of the range can be selected and highlighted; false indicates single value selection only.

LineSize and PageSize

The LineSize property gets or sets the size of the interval when moving the slider with the keyboard or mouse wheel. The PageSize property gets or sets the interval for moving the slider with for page-related keys or mouse wheel. These properties affect the feel and operation of the Slider. Use a small value of LineSize to allow fine adjustment of the slider via the arrow keys. Use a large value of PageSize to allow quick changes of Slider position using the Page Up and Page Down keys, or by clicking to either side of the Slider pointer. Use Home and End to move quickly to the MinRange and MaxRange values via the keyboard, independent of the PageSize setting.

longSize = Slider.LineSize
Slider.LineSize = longSize

longSize = Slider.PageSize
Slider.PageSize = longSize

Element

Description

longSize

A value that indicates the incremental adjustment to the Slider position while using the keyboard or mouse wheel.

MaxRange and MinRange

The MaxRange property gets or sets the maximum value of the control. The MinRange property gets or sets the minimum value of the control. These properties can also be accessed via the Properties page, and will affect the number of ticks on the slider.

longVal = Slider.MaxRange        longVal = Slider.MinRange
Slider.MaxRange = longVal        Slider.MinRange = longVal

Element

Description

longVal

A integer value that indicates the maximum or minimum value of the Slider control.

Position

The Position property gets or sets the logical position of the pointer. This is probably the most important property of the Slider control. Use this property to get the current position by invoking the Recalculate method in the ValueChanged event, and querying this property in the Exec event.

longPos = Slider.Position
Slider.Position = longPos

Element

Description

longPos

An integer value that determines the logical position of the pointer.

SelectionLow and SelectionHigh

The SelectionLow property gets or sets the low value of the selection range, and the SelectionHigh property gets or sets the high value of the selection range. The values must be within the MinRange and MaxRange properties and SelectionLow must be less than SelectionHigh.

longSel = Slider.SelectionLow         longSel = Slider.SelectionHigh
Slider.SelectionLow = longSel         Slider.SelectionHigh = longSel

Element

Description

longSel

An integer low or high value of the range.