TextField
TextField component allows the editing of a single line of text.
This field has a simple text value and 10 characters width. <textfield text="TextField" columns="10" />
Properties
text | string | '' | The text contained in this field. |
columns | integer | 0 | The preferred width of the component is fixed (if 0)
or calculated by the given value. |
editable | boolean | true | The specified boolean to indicate whether or not this textfield
should be editable. A non-editable field is focusable, and selectable. |
alignment | choice | left | The alignment of the text content along the X axis.
Possible values are: left, center, and right. The default value, if not set, is left. |
start | integer | 0 | Start index of the selection. |
end | integer | 0 | End index of the selection, same as the caret position. |
name, enabled, visible, tooltip, property, width, height, colspan, rowspan,
weightx, weighty, halign, and valign parameters are similar to
component |
Listeners
action | Gives notification (invokes the given method) that there was an
insert into the text or a portion of the text has been removed. |
insert | Gives notification that there was an insert into the text
(and possibly a portion has been removed too). |
remove | Gives notification that a portion of the text has been removed. |
caret | To track whenever the caret position has been changed. |
perform | Invokes the given method if enter was pressed in an
editable and enabled textfield. |
Keyboard-actions
Right arrow | Moves insertion point one character to the right |
Left arrow | Moves insertion point one character to the left |
Ctrl-right arrow | Moves insertion point to beginning of next word |
Ctrl-left arrow | Moves insertion point to beginning of previous word |
Home | Moves insertion point to beginning of field |
End | Moves insertion point to end of field |
+Shift | Extends selection |
Backspace | Deletes the previous character |
Delete | Removes the following character |
Ctrl-A, Ctrl-Slash | Selects all |
Ctrl-Backslash | Deselects all |
Ctrl-X | Cuts selected text into the clipboard |
Ctrl-C | Copies selected text into the clipboard |
Ctrl-V | Pastes the clipboard content |
Tab, Shift-Tab | Navigate forward, backward |
|