scrollbars([horizontal_or_both], [vertical])

Class: ScrollPane. Method inherited from UIComponent.

Description:

Sets or gets scroll bars visibility for horizontal and vertical scroll bars.

Parameters:

Name Type Description

[horizontal_or_both]

boolean | null | Object

true = visible, false = hidden, null = auto. Also can be an Object of both values. e.g. {h:false, v:null}

[vertical]

boolean | null

true = visible, false = hidden, null = auto. When first argument is provided but this one is omitted, then this will match the first argument.

Returns:

Returns this component if at least one argument is provided, otherwise returns current state of both scroll bars: {h:boolean|null, v: boolean|null}.

Type: this | Object

Examples:

textarea.scrollbars(true); // makes both scroll bars always visible
textarea.scrollbars(false, null); // makes horizontal scroll bar hidden, but vertical will become visible as needed
textarea.scrollbars({h: false, v: null});  // makes horizontal scroll bar hidden, but vertical will become visible as needed