SCROLLBARSET

Synopsis
SCROLLBARSET name min max position
Description

Set the range and current position of the scrollbar control that is identified by name. You can invoke SCROLLBARSET multiple times on the same scrollbar.

The min input is the minimum value representable by the scrollbar. This must be an integer.

The max input is the maximum value representable by the scrollbar. This must be an integer that is greater than or equal to min.

The position input is the current value of the scrollbar. This must be an integer. If position is not between min and max, then the scrollbar's position is set to either min or max, whichever is closer.

Example
WINDOWCREATE "main "mywindow "mytitle 0 0 100 100 []
SCROLLBARCREATE "mywindow "myscroll 25 25 50 0 [SETHEADING SCROLLBARGET "myscroll]
SCROLLBARSET "myscroll 0 360 0
Move the scrollbar and observe what happens to the turtle.
WINDOWDELETE "mywindow

SourceForge.net Logo