Packagekm.components
Classpublic class Label
InheritanceLabel Inheritance UIComponent Inheritance flash.display.Sprite
SubclassesCheckBox, LabelScroll

The Label component class.
A lot of the properties of the Label class are similar to those of the flash.text.TextField class.
It's recommended to study information on that class if you want to know more about them.


Example
import km.components.*;

var l:Label = new Label();
l.text = 'Label';
l.icon = new BitmapData(8, 8, false, 0xc0b0a0);
l.move(20,20);
addChild(l);

See also

flash.text.TextField


Public Properties
 PropertyDefined by
  align : String
Horizontal alignment within the bounding box.
Possible values are 'left', 'right' and 'center'.
Label
  antiAliasType : String
Label
  background : Boolean
Label
  backgroundColor : uint
Label
  defaultTextFormat : TextFormat
Label
  displayAsPassword : Boolean
Label
 Inheritedduotone : Array
The duotone property can be used to convert the colors of the component into duotone.
UIComponent
  embedFonts : Boolean
Label
 Inheritedenabled : Boolean
Specifies if the component is enabled.
If a component is disabled, it will be turned into grayscale and become partly transparent.
UIComponent
  gridFitType : String
Label
 Inheritedheight : Number
UIComponent
  htmlText : String
Label
  icon : BitmapData
Label
  labelPlacement : String
Placement of the label text.
Possible values are 'left' and 'right'.
Label
  length : int
[read-only]
Label
  maxChars : int
Label
  restrict : String
Label
  sharpness : Number
Label
  text : String
Label
  textColor : uint
Label
  thickness : Number
Label
 InheritedtoolTip : String
Text to use as toolTip when ToolTip is enabled.
UIComponent
  type : String
Label
  valign : String
Vertical alignment within the bounding box.
Possible values are 'top', 'bottom' and 'center'.
Label
 Inheritedwidth : Number
UIComponent
  wordWrap : Boolean
Label
 Inheritedx : Number
UIComponent
 Inheritedy : Number
UIComponent
Public Methods
 MethodDefined by
  
The default size of a label is 120 x 20 pixels.
Label
 Inherited
clone():*
Returns a clone of the component.
The skin of the component is cloned but other things like the text of a label or the items of a list aren't.
UIComponent
 Inherited
move(x:int, y:int, animationMode:int = 0, animationFrames:int = 12, easeInOut:Boolean = false):void
Moves the component to the specified coordinates.
UIComponent
 Inherited
setProperties(o:Object):void
Sets a number of properties at once.
UIComponent
 Inherited
setSize(w:int, h:int):void
Sets the size width and height.
UIComponent
Events
 EventSummaryDefined by
 Inherited The animationComplete event is broadcasted when an animated move is completed.UIComponent
Property detail
alignproperty
align:String  [read-write]

Horizontal alignment within the bounding box.
Possible values are 'left', 'right' and 'center'.

The default value is 'left'.

Implementation
    public function get align():String
    public function set align(value:String):void
antiAliasTypeproperty 
antiAliasType:String  [read-write]

Implementation
    public function get antiAliasType():String
    public function set antiAliasType(value:String):void
backgroundproperty 
background:Boolean  [read-write]

Implementation
    public function get background():Boolean
    public function set background(value:Boolean):void
backgroundColorproperty 
backgroundColor:uint  [read-write]

Implementation
    public function get backgroundColor():uint
    public function set backgroundColor(value:uint):void
defaultTextFormatproperty 
defaultTextFormat:TextFormat  [read-write]

Implementation
    public function get defaultTextFormat():TextFormat
    public function set defaultTextFormat(value:TextFormat):void
displayAsPasswordproperty 
displayAsPassword:Boolean  [read-write]

Implementation
    public function get displayAsPassword():Boolean
    public function set displayAsPassword(value:Boolean):void
embedFontsproperty 
embedFonts:Boolean  [read-write]

Implementation
    public function get embedFonts():Boolean
    public function set embedFonts(value:Boolean):void
gridFitTypeproperty 
gridFitType:String  [read-write]

Implementation
    public function get gridFitType():String
    public function set gridFitType(value:String):void
htmlTextproperty 
htmlText:String  [read-write]

Implementation
    public function get htmlText():String
    public function set htmlText(value:String):void
iconproperty 
icon:BitmapData  [read-write]

Implementation
    public function get icon():BitmapData
    public function set icon(value:BitmapData):void
labelPlacementproperty 
labelPlacement:String  [read-write]

Placement of the label text.
Possible values are 'left' and 'right'.

The default value is 'right'.

Implementation
    public function get labelPlacement():String
    public function set labelPlacement(value:String):void
lengthproperty 
length:int  [read-only]

Implementation
    public function get length():int
maxCharsproperty 
maxChars:int  [read-write]

Implementation
    public function get maxChars():int
    public function set maxChars(value:int):void
restrictproperty 
restrict:String  [read-write]

Implementation
    public function get restrict():String
    public function set restrict(value:String):void
sharpnessproperty 
sharpness:Number  [read-write]

Implementation
    public function get sharpness():Number
    public function set sharpness(value:Number):void
textproperty 
text:String  [read-write]

Implementation
    public function get text():String
    public function set text(value:String):void
textColorproperty 
textColor:uint  [read-write]

Implementation
    public function get textColor():uint
    public function set textColor(value:uint):void
thicknessproperty 
thickness:Number  [read-write]

Implementation
    public function get thickness():Number
    public function set thickness(value:Number):void
typeproperty 
type:String  [read-write]

Implementation
    public function get type():String
    public function set type(value:String):void
valignproperty 
valign:String  [read-write]

Vertical alignment within the bounding box.
Possible values are 'top', 'bottom' and 'center'.

The default value is 'center'.

Implementation
    public function get valign():String
    public function set valign(value:String):void
wordWrapproperty 
wordWrap:Boolean  [read-write]

Implementation
    public function get wordWrap():Boolean
    public function set wordWrap(value:Boolean):void
Constructor detail
Label()constructor
public function Label()

The default size of a label is 120 x 20 pixels.