User Guide

Sizing components 49
Sizing components
Use the Free Transform tool or the setSize() method to resize component instances.
Resizing the Menu component on the Stage with the Free Transform tool
You can call the
setSize() method from any component instance (see UIObject.setSize()
on page 823) to resize it. The following code resizes the Menu component to 200 pixels wide and
300 pixels high:
myMenu.setSize(200, 300);
Note: If you use the ActionScript
_width and _height properties to adjust the width and height of a
component, the component is resized but the layout of the content in the component remains the
same. This might cause the component to be distorted in movie playback.
A component does not resize automatically to fit its label. If a component instance that has been
added to a document is not large enough to display its label, the label text is clipped. You must
resize the component to fit its label.
A clipped label for the CheckBox component
For more information about sizing components, see their individual entries in Chapter 6,
“Components Dictionary,” on page 91.