Blitz3D+ Command Reference

TrackBarValue ( trackbar )

Parameters

trackbar - trackbar gadget

Description

Returns the current value of a trackbar - where its thumb sits in the range.

Requires Extended language mode.

Reads the position of a trackbar made with CreateTrackBar, always within the inclusive range set by SetTrackBarRange (0 to 100 until you change it). This is the number your tool actually wants - a brush size, a volume, a zoom percentage.

You can poll it any time, but the event-driven way is tidier: while the user drags, the trackbar posts replaceable $401 snapshots and then one final critical $401, each carrying the value in EventData - so a handler can preview from EventData and only commit on the final event, calling TrackBarValue whenever it wants the settled truth.

The query is silent and posts no events. Programmatic moves via SetTrackBarValue are silent too, so reading back after setting is never confused by echoes.

Do not mix it up with SliderValue: a trackbar picks a value from a range, while CreateSlider is a scrollbar with visible/total page semantics.

See it working in the native input controls sample.

See also: SetTrackBarValue, SetTrackBarRange, SetTrackBarStep, CreateTrackBar, SliderValue.

Index