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
text | string | | The text string that the button displays. |
icon | icon | | The icon image that the button displays. |
alignment | choice | center | The 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). |
mnemonic | integer | -1 | Specifies 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. |
type | choice | normal | Possible 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
action | Invokes the given method when the button is pressed by mouse or keyboard. |
Keyboard-actions
Spacebar | Activates button |
Tab, Shift-Tab | Navigate forward, backward |
|