ScrollAreaScreenGadget()

Syntax

Result = ScrollAreaScreenGadget(#ScreenGadget, x, y, Width, Height, ScrollAreaWidth, ScrollAreaHeight, ScrollStep)
Description
Creates a ScrollArea gadget in the current GadgetList. It's very useful when a gadget is too big to fit the window dimension. In that case, it can be put into a scrollarea. All the scrolling is handled automatically by the gadget. This is a container gadget, intended to have one or several gadget in its scroll area. Once the gadget is created, all future created gadgets will be created inside the scroll area. When all the needed gadgets have been created, CloseScreenGadgetList() must be called to return to the previous GadgetList. OpenScreenGadgetList() can be used later to add others gadgets on the fly in the scroll area.

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.
ScrollAreaWidth, ScrollAreaHeight The dimensions of the scrollable area inside the gadget. These can also be smaller than the outer dimensions, in this case scrolling will be disabled.
ScrollStep (optional) The amount of pixels to scroll when the user presses the scroll bar arrows.

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.

Supported OS

All

<- ScreenWindowEvent() - ScreenGadget Index - ScrollBarScreenGadget() ->