size([width_or_size], [height])
Class: Button. Method inherited from UIComponent.
Description:
Sets or gets the size of the component.
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();
