anchor([anchors])
Class: Button. Method inherited from UIComponent.
Description:
Sets or gets the anchor style of the component that indicates how to resize this component based on the resizing parent component.
Anchors define which sides (top, right, bottom, left) of the component stay attached to the parent when parent gets resized.
Parameters:
| Name | Type | Description |
|---|---|---|
|
|
string |
Space-separated list of sides to anchor (e.g., |
Returns:
Returns this component when setting, or the current anchor string when getting value.
Type: this | string
Examples:
const txt1 = new TextArea().anchor("top left right"); // Horizontally resizable
const txt2 = new TextArea().anchor("top left bottom"); // Vertically resizable
