Package | km.components |
Class | public class Label |
Inheritance | Label ![]() ![]() |
Subclasses | CheckBox, LabelScroll |
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
Property | Defined 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 | ||
![]() | duotone : Array The duotone property can be used to convert the colors of the component into duotone.
| UIComponent | |
embedFonts : Boolean | Label | ||
![]() | enabled : 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 | ||
![]() | height : 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 | ||
![]() | toolTip : 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 | ||
![]() | width : Number | UIComponent | |
wordWrap : Boolean | Label | ||
![]() | x : Number | UIComponent | |
![]() | y : Number | UIComponent |
Method | Defined by | ||
---|---|---|---|
Label()
The default size of a label is 120 x 20 pixels.
| Label | ||
![]() |
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 | |
![]() |
move(x:int, y:int, animationMode:int = 0, animationFrames:int = 12, easeInOut:Boolean = false):void
Moves the component to the specified coordinates.
| UIComponent | |
![]() |
setProperties(o:Object):void
Sets a number of properties at once.
| UIComponent | |
![]() |
setSize(w:int, h:int):void
Sets the size width and height.
| UIComponent |
align | property |
align:String
[read-write] Horizontal alignment within the bounding box.
Possible values are 'left', 'right' and 'center'.
The default value is 'left'
.
public function get align():String
public function set align(value:String):void
antiAliasType | property |
antiAliasType:String
[read-write]Implementation
public function get antiAliasType():String
public function set antiAliasType(value:String):void
background | property |
background:Boolean
[read-write]Implementation
public function get background():Boolean
public function set background(value:Boolean):void
backgroundColor | property |
backgroundColor:uint
[read-write]Implementation
public function get backgroundColor():uint
public function set backgroundColor(value:uint):void
defaultTextFormat | property |
defaultTextFormat:TextFormat
[read-write]Implementation
public function get defaultTextFormat():TextFormat
public function set defaultTextFormat(value:TextFormat):void
displayAsPassword | property |
displayAsPassword:Boolean
[read-write]Implementation
public function get displayAsPassword():Boolean
public function set displayAsPassword(value:Boolean):void
embedFonts | property |
embedFonts:Boolean
[read-write]Implementation
public function get embedFonts():Boolean
public function set embedFonts(value:Boolean):void
gridFitType | property |
gridFitType:String
[read-write]Implementation
public function get gridFitType():String
public function set gridFitType(value:String):void
htmlText | property |
htmlText:String
[read-write]Implementation
public function get htmlText():String
public function set htmlText(value:String):void
icon | property |
icon:BitmapData
[read-write]Implementation
public function get icon():BitmapData
public function set icon(value:BitmapData):void
labelPlacement | property |
labelPlacement:String
[read-write] Placement of the label text.
Possible values are 'left' and 'right'.
The default value is 'right'
.
public function get labelPlacement():String
public function set labelPlacement(value:String):void
length | property |
length:int
[read-only]Implementation
public function get length():int
maxChars | property |
maxChars:int
[read-write]Implementation
public function get maxChars():int
public function set maxChars(value:int):void
restrict | property |
restrict:String
[read-write]Implementation
public function get restrict():String
public function set restrict(value:String):void
sharpness | property |
sharpness:Number
[read-write]Implementation
public function get sharpness():Number
public function set sharpness(value:Number):void
text | property |
text:String
[read-write]Implementation
public function get text():String
public function set text(value:String):void
textColor | property |
textColor:uint
[read-write]Implementation
public function get textColor():uint
public function set textColor(value:uint):void
thickness | property |
thickness:Number
[read-write]Implementation
public function get thickness():Number
public function set thickness(value:Number):void
type | property |
type:String
[read-write]Implementation
public function get type():String
public function set type(value:String):void
valign | property |
valign:String
[read-write] Vertical alignment within the bounding box.
Possible values are 'top', 'bottom' and 'center'.
The default value is 'center'
.
public function get valign():String
public function set valign(value:String):void
wordWrap | property |
wordWrap:Boolean
[read-write]Implementation
public function get wordWrap():Boolean
public function set wordWrap(value:Boolean):void
Label | () | constructor |
public function Label()
The default size of a label is 120 x 20 pixels.