size([width_or_size], [height])
Class: Slider. Method inherited from UIComponent.
Description:
Sets or gets the size of the component.
For Window, the returned and assigned size represents the entire window, including the title bar and borders. The actual area available for placing child components is smaller. Use Window > innerSize when you need to specify the content area size instead.
Parameters:
| Name | Type | Description |
|---|---|---|
|
|
number | Size |
Number as width, or |
|
|
number |
Height of component. Required if first argument is |
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();
