Package | com.ghostwire.ui.controls |
Class | public class uiImageButton |
Inheritance | uiImageButton ![]() ![]() ![]() |
uiImageButton
is a button containing a uiImage
instance allowing you to
display an image inside the button.
"skin" Property
The default value is ImageButton
, and the asset(s) used are:
ImageButton.png
Reminder: If no background is intended, set the "skin" property to null
.
Although you can also use the uiLabelButton
class to achieve the same result,
this class is more efficient if you just want to display an icon inside the button (no text).
~ This class is available in Aspire UI Components Lite Edition ~
Property | Defined by | ||
---|---|---|---|
![]() | alignX : Number
Indicates how the component would like to be aligned horizontally within its allocated space.
| uiComponent | |
![]() | alignY : Number
Indicates how the component would like to be aligned vertically within its allocated space.
| uiComponent | |
![]() | background : Object
Indicates the style of the background for this component.
| uiComponent | |
![]() | container : uiComponent
Indicates the
uiComponent instance that contains this instance. | uiComponent | |
![]() | data : Object
Indicates the data to be associated with this button.
| uiButton | |
![]() | depth : int
Indicates how deep the component is in the containment hierarchy.
| uiComponent | |
![]() | desiredAllocationHeight : int
Indicates the vertical space this component would like to be allocated.
| uiComponent | |
![]() | desiredAllocationWidth : int
Indicates the horizontal space this component would like to be allocated.
| uiComponent | |
![]() | displaceX : int
Indicates the amount of pixels to move any embedded child object horizontally to the right when the
button is pressed down.
| uiButton | |
![]() | displaceY : int
Indicates the amount of pixels to move any embedded child object vertically downwards when the
button is pressed down.
| uiButton | |
![]() | enabled : Boolean
Indicates whether the component is enabled for user interaction.
| uiComponent | |
![]() | fillX : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated
horizontal space.
| uiComponent | |
![]() | fillY : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated
vertical space.
| uiComponent | |
![]() | focusPadding : Object
Indicates the thickness of the interior space from the edge of the component to the focus
rectangle.
| uiComponent | |
![]() | focusRect : Object
Indicates the class to use when rendering the rectangle around the component to indicate that it
is in focus.
| uiComponent | |
![]() | group : uiButtonGroup
Indicates the
uiButtonGroup this button is assigned to. | uiButton | |
![]() | height : Number
Indicates the current
height of the component. | uiComponent | |
![]() | margin : Object
Indicates the thickness of the space surrounding the component.
| uiComponent | |
![]() | maxHeight : int
Indicates the upper limit for
height . | uiComponent | |
![]() | maxWidth : int
Indicates the upper limit for
width . | uiComponent | |
![]() | minHeight : int
Indicates the lower limit for
height . | uiComponent | |
![]() | minWidth : int
Indicates the lower limit for
width . | uiComponent | |
![]() | padding : 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 | |
![]() | selected : Boolean
Indicates whether the button is selected; applicable only if the
toggle property is
set to true . | uiButton | |
![]() | skin : String
Indicates the name of the skin to use for this component instance.
| uiComponent | |
source : String
Indicates the source to the image displayed inside the button.
| uiImageButton | ||
![]() | stretch : Boolean
Indicates whether surplus space available in the parent container should be allocated to this
component.
| uiComponent | |
![]() | textStyle : String
Indicates the style to use for
uiText instances contained in this component. | uiComponent | |
![]() | toggle : Boolean
Indicates whether the button should toggle its
selected property value between
true and false when it is clicked. | uiButton | |
![]() | toolTip : Object
Indicates the content (text) of the tooltip that should be shown when the mouse hovers
over this control.
| uiComponent | |
uiimage : uiImage
[read-only]
Returns a reference to the
uiImage instance embedded inside this button. | uiImageButton | ||
![]() | uiskin : uiBitmapImage
Returns the
uiBitmapImage rendered as the skin - for advanced users only. | uiComponent | |
![]() | visible : Boolean
Indicates whether or not the component is visible within its container.
| uiComponent | |
![]() | width : Number
Indicates the current
width of the component. | uiComponent |
Method | Defined by | ||
---|---|---|---|
uiImageButton(src:String = null)
Constructor - creates a new
uiImageButton instance. | uiImageButton | ||
![]() |
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 | |
![]() |
invalidate(type:String):void
Invalidates this component's "size", "display", "layout" or "textstyle".
| uiComponent | |
![]() |
move(x:Number, y:Number, noEvent:Boolean = false):void
Moves the component to the specified position, disregarding its allocation.
| uiComponent | |
![]() |
removeAllChildren(all:Boolean = false):void
Removes all children from this component.
| uiComponent | |
![]() |
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 | |
![]() |
setSize(width:Number, height:Number, noEvent:Boolean = false):void
Sets this component's size to the specified
width and height . | uiComponent | |
![]() |
setVisible(value:Boolean, noEvent:Boolean = false):void
Sets the visibility of this component instance, dispatching a "show" or "hide" event accordingly.
| uiComponent | |
![]() |
validateNow():void
Validates and render the component instance, and any component instances with
depth higher than itself in the validation queue, immediately. | uiComponent |
source | property |
source:String
[read-write]Indicates the source to the image displayed inside the button.
You can supply different sources for the different button states. To do so, set this
property to a string value with the following format:
defaultSource|state1|state1Source|state2|state2Source|state3|state3Source|etc...For example:
myIconButton.source = "icon.png|over|icon_over.png|down|icon_down.png";
The default source is for the default "up" state.
The other possible states are:
over down disabled selected selected_over selected_down selected_disabled
The uiImageButton
class does not implement the "emphasized" state. If you
want to use an image button as default button of a uiForm
container, you
must use the uiPushButton
class instead.
Reminder: If no background is intended, set the "skin" property to null
.
The default value is null
.
public function get source():String
public function set source(value:String):void
See also
uiimage | property |
uiimage:uiImage
[read-only]
Returns a reference to the uiImage
instance embedded inside this button.
public function get uiimage():uiImage
uiImageButton | () | constructor |
public function uiImageButton(src:String = null)
Constructor - creates a new uiImageButton
instance.
src:String (default = null ) — A String value specifying the source of the image. You may supply multiple
sources here for the different button states. See the entry for source property for
details.
|