mx.controls
Class Label


Direct Known Subclasses
           mx.controls.FormItemLabel, mx.controls.Text

class Label
extends mx.core.UIObject

The Label control is a noneditable single line field label. Use the Label control to create larger blocks of multiline noneditable text. You can specify that a label can be formatted with HTML. You can also control alignment and sizing of a label.

Label controls do not have borders and cannot take focus. Unlike other controls, Label controls directly extend the UIObject class, not UIControl.

MXML Syntax

The <mx:Label> tag inherits all the properties of its parent classes, and the following properties:

 <mx:Label
htmlText="No default."
text="No default."
hide="Event handler; no default."
show="Event handler; no default."
/>



Methods

Methods inherited from class mx.core.UIObject
createAccessibilityImplementation  measure  doLater  cancelAllDoLaters  invalidate  invalidateStyle  invalidateProperties  invalidateSize  redraw  move  setSize  setSizeNoLayout  drawRect  fillRect  destroyLabel  createClassObject  createEmptyObject  destroyObject  getStyle  setMask  swapDepths 


Properties
      className:String  
Name of this class.
staticversion:String  
ComponentVersion is for internal use only.
      text:String   [Read-Write]
Text string that appears in the Label control.
      htmlText:String   [Read-Write]
HTML formatted text in the label.

Properties inherited from class mx.core.UIObject
version  nestLevel  dispatchEvent  addEventListener  handleEvent  removeEventListener  kStretch  styleName  className  setStyle  parentApplication  isDocument  parentDocument  documentDescriptor  descriptor  instanceIndices  repeaterIndices  getRepeaterItem  id  width  height  x  y  minHeight  minWidth  preferredHeight  preferredWidth  maxHeight  maxWidth  widthFlex  heightFlex  visible  scaleX  scaleY  alpha  depth  mouseX  mouseY  toolTip  baselinePosition 


Effects
showEffectMake component visible.
hideEffectMake component invisible

Effects inherited from class mx.core.UIObject
creationCompleteEffect  moveEffect  resizeEffect  mouseDownEffect  mouseOverEffect  mouseOutEffect  mouseUpEffect 


Events
showBroadcast when the component becomes visible. Target contains a reference to the component that triggered the event. Type contains the name of the event.
hideBroadcast when an object`s state changes from visible to invisible. Target contains a reference to the component that triggered the event. Type contains the name of the event.

Events inherited from class: mx.core.UIObject
initialize  creationComplete  resize  move  draw  load  unload  mouseDown  mouseUp  mouseMove  mouseOver  mouseOut  mouseDownSomewhere  mouseUpSomewhere  mouseMoveSomewhere  mouseChangeSomewhere  effectStart  effectEnd  dragBegin  dragComplete  dragEnter  dragOver  dragExit  dragDrop 


Styles
backgroundColor Type: Number   Format: Color   CSS Inheritance: yes
Background color of the label.
backgroundDisabledColor Type: Number   Format: Color   CSS Inheritance: yes
Background color when disabled. The default value is #EFEEEF.
backgroundImage Type: String   CSS Inheritance: no
Background image of label.
disabledColor Type: Number   Format: Color   CSS Inheritance: yes
Disabled color for text. The default value is #848384.
themeColor Type: Number   Format: Color   CSS Inheritance: yes
Background color of the Label. Possible values are haloGreen, haloBlue, and haloOrange. Macromedia recommends setting the themeColor style in <mx:Application>, instead of in individual controls.

Styles inherited from class mx.core.UIObject
color  fontFamily  fontSize  fontStyle  fontWeight  textAlign  textDecoration  textIndent  marginLeft  marginRight  horizontalGap  verticalGap 


Property Detail

className

className:String  

Name of this class.


htmlText

htmlText:String   [Read-Write]

HTML formatted text in the label. If the text string contains HTML tags, you must wrap it in the CDATA tag.


text

text:String   [Read-Write]

Text string that appears in the Label control.


version

static version:String  

ComponentVersion is for internal use only.