![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
You can transform a Label component horizontally and vertically both while authoring and at runtime. While authoring, select the component on the Stage and use the Free Transform tool or any of the Modify > Transform commands. You can also set the autoSize authoring parameter; setting this parameter doesn't change the bounding box in the Live Preview, but the label does resize. For more information, see Label parameters. At runtime, use the setSize()
method (see UIObject.setSize()
) or Label.autoSize
.
You can set style properties to change the appearance of a label instance. All text in a Label component instance must share the same style. For example, you can't set the color
style to "blue"
for one word in a label and to "red"
for the second word in the same label.
If the name of a style property ends in "Color", it is a color style property and behaves differently than non-color style properties.
For more information about styles, see Using styles to customize component color and text.
A Label component supports the following styles:
Style |
Description |
---|---|
color
|
The default color for text. |
embedFonts
|
The fonts to embed in the document. |
fontFamily
|
The font name for text. |
fontSize
|
The point size for the font. |
fontStyle
|
The font style, either "normal",or "italic". |
fontWeight
|
The font weight, either "normal" or "bold". |
textAlign
|
The text alignment: either "left", "right", or "center". |
textDecoration
|
The text decoration, either "none" or "underline". |
The Label component is not skinnable.
For more information about skinning a component, see About skinning components.
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |