size([width_or_size], [height])

Class: ScrollPane. Method inherited from UIComponent.

Description:

Sets or gets the size of the component.

Parameters:

Name Type Description

[width_or_size]

number | Size

Number as width, or Size formatted object.

[height]

number

Height of component. Required if first argument is number.

Returns:

Component size object if no arguments are set, otherwise returns this component.

Type: Size | this

Examples:

// Usage examples:
button.size(100, 25);
button.size({width: 100, height: 25});
let size = button.size();

Also See: