|
slider - slider gadget visible - how much of the total is on screen at once (the page size) total - the total amount being scrolled over |
|
Sets a slider's scrollbar range: the visible page size and the total it scrolls over. A slider is a real scrollbar, so it thinks in pages rather than plain min/max. Showing 10 lines of a 100-line list means SetSliderRange slider,10,100: the thumb fills a tenth of the track, values run from 0 to 90 (total minus visible), and clicking the empty track jumps by a page of 10. New sliders start with a range of 1,10. The user's scrolling posts $401 gadget-action events with the new position in EventData; read it any time with SliderValue and set it with SetSliderValue. If what you actually want is "pick a number between min and max" - a volume or scale control - a trackbar is the better gadget; CreateTrackBar exists precisely because the two are not the same thing. See it working in the layout and controls sample. See also: SetSliderValue, SliderValue, CreateSlider, CreateTrackBar. |