Blitz3D+ Command Reference

SliderValue ( slider )

Parameters

slider - slider gadget

Description

Returns a slider's current scroll position.

Requires Extended language mode.

Positions run from 0 to total minus visible, as set with SetSliderRange. The natural moment to read it is on a $401 gadget-action event from the slider - EventData carries the same position, but calling SliderValue keeps the code readable and works outside the handler too:

If EventSource()=slider Then UpdateProgBar progress,SliderValue(slider)/100.0

While the user drags the thumb, rapid updates are coalesced in the shared event queue, so read the current value when you handle the event rather than counting events.

See it working in the layout and controls sample.

See also: SetSliderValue, SetSliderRange, CreateSlider, TrackBarValue.

Index