Customizing the Button

You can transform a Button component horizontally and vertically while authoring and at run time. While authoring, select the component on the Stage and use the Free Transform tool or any of the Modify > Transform commands. At run time, use the setSize() method or any applicable properties of the Button class, such as height and width, scaleX, and scaleY.

Resizing the button does not change the size of the icon or label. The bounding box of a Button corresponds to the Button's border and also designates the hit area for the instance. If you increase the size of the instance, you also increase the size of the hit area. If the bounding box is too small to fit the label, the label is clipped to fit.

If the Button has an icon and it is larger than the Button, the icon extends beyond the Button's borders.

Related topics