ScrollPane

ScrollPane is a UI component used to display content that may not fit within the visible area, such as large images, scrollable lists, or lengthy forms.

To use it, place another component (e.g., a Panel) inside the ScrollPane, and then add your scrollable items to that inner component. ScrollPane itself only provides scroll bars for scrolling and can contain only one child component at a time. Adding a second child component removes existing one.

DO NOT add components like List, Table, Tree, TextArea, InternalWindowContainer, or DocumentEditor directly to a ScrollPane, because these components already have built-in scrolling.

Constructor

new ScrollPane(textopt)

ScrollPane constructor. Creates an instance of ScrollPane UI component.

Parameters:
NameTypeAttributesDescription
textstring<optional>

Text associated with this ScrollPane. It will be used, for example, for a tab name when this ScrollPane is added to Tabs component.

Classes

ScrollPane

Methods

addChild(component) → {this}

Adds a child component to this container component.

Parameters:
NameTypeDescription
componentObject

UI Component that can be a child of this component.

Returns:

Returns an instance of this component.

Type: 
this