class UIButton
A clickable ui-block
class UIButton extends UIBlock
Inheritance UIElement –> UIBlock –> UIButton
Name | Description |
---|---|
Constructors | |
UIButton() | Creates a new UIButton. |
Properties | |
onClick | Callback function triggered when the button is clicked. |
onLongPress | Callback function triggered when the button is long-pressed. |
Methods | |
setStyle() | Set the displaying style of the ui-button. |
Constructors
UIButton()
UIButton
()
Creates a new UIButton.
Properties
See the base UIBlock class for common properties.
onClick
.onClick
: Function
Callback function triggered when the button is clicked.
Signature: onClick
():undefined
Readable and writable.
Default is null.
onLongPress
.onLongPress
: Function
Callback function triggered when the button is long-pressed.
Signature: onLongPress
():undefined
Readable and writable.
Default is null.
Methods
See the base UIBlock class for common methods.
setStyle()
.setStyle
(style
: Object): undefined
Set the displaying style of the ui-button.
style
may have the following properties:
style.cornerRadius
: Number
Corner radius of the rounded rectangle.
style.strokeWidth
: Number
Line-width of the stroke.
style.colorBg
: String
Background color of the panel.
style.colorStroke
: String
Stroke color of the panel.