Packagecom.ghostwire.ui.controls
Classpublic class uiLabelButton
InheritanceuiLabelButton Inheritance uiButton Inheritance uiComponent Inheritance flash.display.Sprite
SubclassesuiCheckBox, uiPushButton

The uiLabelButton is a button containing a uiLabel instance allowing you to display an image or text or both inside the button.

Note: use the uiPushButton class when you want to create a uiLabelButton that can be used as the default button in uiForm containers.

"skin" Property
The default value is "LabelButton" and the asset(s) used are:

 LabelButton.png
 

~ This class is available in Aspire UI Components Lite Edition ~



Public Properties
 PropertyDefined by
 InheritedalignX : Number
Indicates how the component would like to be aligned horizontally within its allocated space.
uiComponent
 InheritedalignY : Number
Indicates how the component would like to be aligned vertically within its allocated space.
uiComponent
 Inheritedbackground : Object
Indicates the style of the background for this component.
uiComponent
 Inheritedcontainer : uiComponent
Indicates the uiComponent instance that contains this instance.
uiComponent
 Inheriteddata : Object
Indicates the data to be associated with this button.
uiButton
 Inheriteddepth : int
Indicates how deep the component is in the containment hierarchy.
uiComponent
 InheriteddesiredAllocationHeight : int
Indicates the vertical space this component would like to be allocated.
uiComponent
 InheriteddesiredAllocationWidth : int
Indicates the horizontal space this component would like to be allocated.
uiComponent
 InheriteddisplaceX : int
Indicates the amount of pixels to move any embedded child object horizontally to the right when the button is pressed down.
uiButton
 InheriteddisplaceY : int
Indicates the amount of pixels to move any embedded child object vertically downwards when the button is pressed down.
uiButton
 Inheritedenabled : Boolean
Indicates whether the component is enabled for user interaction.
uiComponent
 InheritedfillX : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated horizontal space.
uiComponent
 InheritedfillY : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated vertical space.
uiComponent
 InheritedfocusPadding : Object
Indicates the thickness of the interior space from the edge of the component to the focus rectangle.
uiComponent
 InheritedfocusRect : Object
Indicates the class to use when rendering the rectangle around the component to indicate that it is in focus.
uiComponent
 Inheritedgroup : uiButtonGroup
Indicates the uiButtonGroup this button is assigned to.
uiButton
 Inheritedheight : Number
Indicates the current height of the component.
uiComponent
  image : String
Indicates the source to the image displayed inside/beside the button.
uiLabelButton
 Inheritedmargin : Object
Indicates the thickness of the space surrounding the component.
uiComponent
 InheritedmaxHeight : int
Indicates the upper limit for height.
uiComponent
 InheritedmaxWidth : int
Indicates the upper limit for width.
uiComponent
 InheritedminHeight : int
Indicates the lower limit for height.
uiComponent
 InheritedminWidth : int
Indicates the lower limit for width.
uiComponent
 Inheritedpadding : Object
Indicates the thickness of the interior space from the edge of the component to the content area, which is where child components, if any, are contained.
uiComponent
 Inheritedselected : Boolean
Indicates whether the button is selected; applicable only if the toggle property is set to true.
uiButton
 Inheritedskin : String
Indicates the name of the skin to use for this component instance.
uiComponent
 Inheritedstretch : Boolean
Indicates whether surplus space available in the parent container should be allocated to this component.
uiComponent
  text : String
Indicates the text displayed inside/beside the button.
uiLabelButton
  textPosition : int
Indicates the position of the uiText instance vis-a-vis the uiImage instance, if any.
uiLabelButton
 InheritedtextStyle : String
Indicates the style to use for uiText instances contained in this component.
uiComponent
 Inheritedtoggle : Boolean
Indicates whether the button should toggle its selected property value between true and false when it is clicked.
uiButton
 InheritedtoolTip : Object
Indicates the content (text) of the tooltip that should be shown when the mouse hovers over this control.
uiComponent
  uilabel : uiLabel
[read-only] Returns the embedded uiLabel instance - for advanced users only.
uiLabelButton
 Inheriteduiskin : uiBitmapImage
Returns the uiBitmapImage rendered as the skin - for advanced users only.
uiComponent
  uitext : uiText
[read-only] Returns the embedded uiText instance - for advanced users only.
uiLabelButton
 Inheritedvisible : Boolean
Indicates whether or not the component is visible within its container.
uiComponent
 Inheritedwidth : Number
Indicates the current width of the component.
uiComponent
Public Methods
 MethodDefined by
  
uiLabelButton(text:String = null, image:String = null, textPosition:int = 0)
Constructor - creates a new uiLabelButton instance.
uiLabelButton
 Inherited
activate(noEvent:Boolean = false):void
Activates and gives focus to the button as if the button has been clicked on (a MouseEvent.CLICK event will be dispatched).
uiButton
 Inherited
invalidate(type:String):void
Invalidates this component's "size", "display", "layout" or "textstyle".
uiComponent
 Inherited
move(x:Number, y:Number, noEvent:Boolean = false):void
Moves the component to the specified position, disregarding its allocation.
uiComponent
 Inherited
removeAllChildren(all:Boolean = false):void
Removes all children from this component.
uiComponent
 Inherited
setFocus(flag:Boolean = true):void
Gives this component instance the focus; the component must be on the display list and has its tabEnabled property set to true, otherwise this method will fail silently.
uiComponent
 Inherited
setSize(width:Number, height:Number, noEvent:Boolean = false):void
Sets this component's size to the specified width and height.
uiComponent
 Inherited
setVisible(value:Boolean, noEvent:Boolean = false):void
Sets the visibility of this component instance, dispatching a "show" or "hide" event accordingly.
uiComponent
 Inherited
validateNow():void
Validates and render the component instance, and any component instances with depth higher than itself in the validation queue, immediately.
uiComponent
Events
 EventSummaryDefined by
 Inherited Dispatched when the selected property changes.uiButton
 Inherited Dispatched when the button is activated, either by user clicking on it or pressing the SPACE key while the button is in focus.uiButton
 Inherited Dispatched when the component's visible property is changed from true to false via calling the setVisible() method.uiComponent
 Inherited Dispatched when the component's position within its parent container has changed via calling the move() method.uiComponent
 Inherited Dispatched when the component's size has changed via calling the setSize() method.uiComponent
 Inherited Dispatched when the component's visible property is changed from false to true via calling the setVisible() method.uiComponent
Property detail
imageproperty
image:String  [read-write]

Indicates the source to the image displayed inside/beside the button. The property returns null if no image is displayed.

The default value is null.

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

Indicates the text displayed inside/beside the button. The property returns null if no text is displayed.

The default value is null.

Implementation
    public function get text():String
    public function set text(value:String):void
textPositionproperty 
textPosition:int  [read-write]

Indicates the position of the uiText instance vis-a-vis the uiImage instance, if any. Qualified values are POSITION.LEFT, POSITION.RIGHT, POSITION.TOP or POSITION.BOTTOM. By default, the uiText is placed to the right of the uiImage.

Implementation
    public function get textPosition():int
    public function set textPosition(value:int):void

See also

uilabelproperty 
uilabel:uiLabel  [read-only]

Returns the embedded uiLabel instance - for advanced users only. This property is exposed in case you would like greater control over the embedded uiLabel instance.

Implementation
    public function get uilabel():uiLabel
uitextproperty 
uitext:uiText  [read-only]

Returns the embedded uiText instance - for advanced users only. This property is exposed in case you would like greater control over the embedded uiText instance. This method also helps the setMnemonicKey() method of the uiForm class locate the uiText instance.

Implementation
    public function get uitext():uiText

See also

Constructor detail
uiLabelButton()constructor
public function uiLabelButton(text:String = null, image:String = null, textPosition:int = 0)

Constructor - creates a new uiLabelButton instance.

Parameters
text:String (default = null) — A String value specifying the text to be displayed inside the button.
 
image:String (default = null) — A String value indicating the source to the image/icon to be displayed inside the button.
 
textPosition:int (default = 0) — A String value indicating the position of the text vis-a-vis the image. Qualified values are POSITION.LEFT, POSITION.RIGHT, POSITION.TOP or POSITION.BOTTOM. By default, the text is positioned to the right of the image.