Button

The following button displays a short text string and an image. Its content is on the left and centered vertically. The second button resembles an HTML link, and when pressed invokes the method goHome.

<button text="Button" icon="image.gif" alignment="left" tooltip="ToolTip" />
<button text="www.thinlet.com" type="link" action="goHome" />

Properties
NameTypeDefaultDescription
textstring The text string that the button displays.
iconicon The icon image that the button displays.
alignmentchoicecenterThe alignment of the text and image similar to label. Possible values are: center, left, and right. The default value is center. Icons are always displayed to the left of text (if any).
mnemonicinteger-1Specifies the index of underlined char and a key combination (Alt + the char) which invokes the (not necessarily focused, but enabled and visible) button's action listener.
typechoicenormalPossible values are: normal, default, cancel, and link. The default value is normal. Default, and cancel values are for dialog control. Link changes the appearance of button so that it resembles HTML link.
name, enabled, visible, tooltip, property, i18n, width, height, colspan, rowspan, weightx, weighty, halign, and valign parameters are similar to component
Listeners
NameDescription
actionInvokes the given method when the button is pressed by mouse or keyboard.
Keyboard-actions
OperationAction
SpacebarActivates button
Tab, Shift-TabNavigate forward, backward