class Button

InteractiveComponent
Button
Component
Column
DropDown
Toggle
package haxe.ui.components

haxe.ui.core.Component
      ↪ haxe.ui.core.InteractiveComponent
           ↪ haxe.ui.components.Button

General purpose push button that supports both text and icon as well as repeat event dispatching

Composite Children
IdTypeStyle NameNotes
button-labelhaxe.ui.components.Label.labelThe text of the button (if applicable)
button-iconhaxe.ui.components.Image.iconThe icon of the button (if applicable)


Pseudo Classes
NameNotes
:hoverThe style to be applied when the cursor is over the button
:downThe style to be applied when a mouse button is pressed inside the button
:activeThe style to be applied when the button has focus


Example (XML)
<button text="Button" styleNames="myCustomButton" style="font-size: 30px" onClick="trace('hello world')" />


Example (Haxe)
var button = new Button(); button.text = "Button"; button.styleNames = "myCustomButton"; button.fontSize = 30; button.onClick = function(e) { trace("hello world"); }



Properties
easeInRepeater:Bool
clonable
bindable
behaviour
Whether this button will ease in to specified repeatInterval
icon:Variant
clonable
bindable
behaviour
The image resource to use as the buttons icon
remainPressed:Bool
clonable
bindable
behaviour
Whether the buttons state should remain pressed even when the mouse has left its bounds
repeatInterval:Int
clonable
bindable
behaviour
How often this button will dispatch multiple click events while the the mouse is pressed within it
repeater:Bool
clonable
bindable
behaviour
Whether this button will dispatch multiple click events while the the mouse is pressed within it
selected:Bool
clonable
bindable
behaviour
Whether this button is toggled or not (only relavant if toggle = true)
toggle:Bool
clonable
bindable
behaviour
Whether this button should behave as a toggle button or not


Methods
cloneComponent():Button
override










Style properties
fontSize:Null<Float>
style
iconPosition:String
style
textAlign:String
style