![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Use a Label component to create a text label for another component in a form, such as a "Name:" label to the left of a TextInput field that accepts a user's name. If you're building an application using components based on version 2 (v2) of the Macromedia Component Architecture, it's a good idea to use a Label component instead of a plain text field because you can use styles to maintain a consistent look and feel.
The following are authoring parameters that you can set for each Label component instance in the Property inspector or in the Component Inspector panel:
text indicates the text of the label; the default value is Label.
html indicates whether the label is formatted with HTML (true
) or not (false
). If the html
parameter is set to true
, a Label cannot be formatted with styles. The default value is false
.
autoSize indicates how the label sizes and aligns to fit the text. The default value is none. The parameter can be any of the following four values:
Note: The Label component autoSize
property is different from the built-in ActionScript TextField object's autoSize
property.
You can write ActionScript to set additional options for Label instances using its methods, properties, and events. For more information, see Label class.
The following procedure explains how to add a Label component to an application while authoring. In this example, the label is beside a combo box with dates in a shopping cart application.
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |