ScrollBarScreenGadget()
Syntax
Result = ScrollBarScreenGadget(#ScreenGadget, x, y, Width, Height, Minimum, Maximum, PageLength [, Flags])Description
Creates a scrollbar gadget in the current GadgetList. It's widely used when displaying only a part of an object.
Parameters
#ScreenGadget A number to identify the new gadget. #PB_Any can be used to auto-generate this number. x, y, Width, Height The position and dimensions of the new gadget. Minimum, Maximum The range of values that the scrollbar can take. These values should be between 0 and 10,000 to avoid limitations on some operating systems. PageLength The amount of values that are part of the current displayed "page".
For example you can have a picture which is 100 pixels width and you only see 25 pixels. What you see is a called a 'page', in this example, the page length will be 25, the Minimum will be 0 and the Maximum will be 100.Flags (optional) It can be a combination of the following values: #PB_ScrollBar_Vertical : The scrollbar is vertical (instead of horizontal, which is the default).
Return value
Nonzero on success, zero otherwise. If #PB_Any was used as the #ScreenGadget parameter then the return-value is the auto-generated gadget number on success.
Remarks
To add a 'mini help' to this gadget, use ScreenGadgetToolTip().
The following functions can be used to act on this gadget:
- GetScreenGadgetState(): Returns the current slider position (value between the Minimum-Maximum range).
- SetScreenGadgetState(): Changes the current slider position.
Supported OS
All