Skip to content

SetSliderRange

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions
BlitzPlus

SetSliderRange

SetSliderRange:Void slider:Int32, visible:Int32, total:Int32
Parameter Mode Type Default Description
slider In Int32 required Handle of a slider.
visible In Int32 required How much is seen at once.
total In Int32 required How much there is altogether.

Description

Says how much the slider covers. Both numbers are in the units you like, such as the number of lines. The value then goes from 0 to total minus visible, and the size of the handle matches visible compared to total.

Examples

Graphics 320, 240, 32, 2
win = CreateWindow("Range", 10, 10, 300, 100, Desktop(), 3)
sl  = CreateSlider(10, 10, 270, 22, win)
SetSliderRange sl, 5, 25 ; five out of 25 lines are seen, the value goes to 20
Repeat
	e = WaitEvent()
	If e = $401 Then SetGadgetText win, "Top line " + SliderValue(sl)
Until e = $803

Related Commands

SetButtonState, SetGadgetFont, SetGadgetLayout, SetGadgetShape, SetGadgetText, SetPanelColor, SetPanelImage, SetSliderValue

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally