ScrollAreaGadget3D()

Syntax

Result = ScrollAreaGadget3D(#Gadget3D, 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, CloseGadgetList3D() must be called to return to the previous GadgetList. OpenGadgetList3D() can be used later to add others gadgets on the fly in the scroll area.

Parameters

#Gadget3D A number to identify the new 3D 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 #Gadget3D parameter then the return-value is the auto-generated gadget number on success.

Remarks

The following functions can be used to act on a ScrollAreaGadget:

GetGadgetAttribute3D(): With one of the following attribute:
  #PB_ScrollArea3D_InnerWidth  : Returns the width (in pixels) of the contained scrollable area.
  #PB_ScrollArea3D_InnerHeight : Returns the height (in pixels) of the contained scrollable area.
  #PB_ScrollArea3D_X           : Returns the current horizontal scrolling position (in pixels).
  #PB_ScrollArea3D_Y           : Returns the current vertical scrolling position (in pixels).
SetGadgetAttribute3D(): With one of the following attribute:
  #PB_ScrollArea3D_InnerWidth  : Changes the width (in pixels) of the contained scrollable area.
  #PB_ScrollArea3D_InnerHeight : Changes the height (in pixels) of the contained scrollable area.
  #PB_ScrollArea3D_X           : Changes the current horizontal scrolling position (in pixels).
  #PB_ScrollArea3D_Y           : Changes the current vertical scrolling position (in pixels).

Supported OS

All

<- ResizeGadget3D() - Gadget3D Index - ScrollBarGadget3D() ->