CreateTrackBar ( x,y,width,height,group[,style] )
Parameters
|
x,y - position of the trackbar's top-left corner within the group's client area width,height - size of the trackbar group - window or gadget group that owns the trackbar style (optional) - orientation 1: horizontal (default) 2: vertical |
Description
|
Creates a trackbar gadget for picking a value between a minimum and maximum, and returns its handle. Requires Extended language mode. A trackbar is the "drag a thumb to choose a number" control - volume, scale percentage, brush size. It is deliberately a different gadget from CreateSlider, which stays a scrollbar with visible/total page semantics; when what you mean is min-to-max value selection, the trackbar is the one you want. A new trackbar has range 0 to 100, value 0 and step 1. Configure it with SetTrackBarRange, SetTrackBarValue and SetTrackBarStep, and read it with TrackBarValue. While the user drags, the trackbar posts replaceable gadget-action snapshots ($401) with the value in EventData - the queue keeps only the newest under load - followed by a critical final action when they let go. Programmatic setters are silent. See it working in the native input controls sample, where one scales a live preview. See also: SetTrackBarRange, SetTrackBarValue, TrackBarValue, SetTrackBarStep, CreateSlider, CreateSpinBox. |
Index