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
NameTypeDefaultDescription
textstring''The text contained in this field.
columnsinteger0The preferred width of the component is fixed (if 0) or calculated by the given value.
editablebooleantrueThe specified boolean to indicate whether or not this textfield should be editable. A non-editable field is focusable, and selectable.
alignmentchoiceleftThe alignment of the text content along the X axis. Possible values are: left, center, and right. The default value, if not set, is left.
startinteger0Start index of the selection.
endinteger0End 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
NameDescription
actionGives notification (invokes the given method) that there was an insert into the text or a portion of the text has been removed.
insertGives notification that there was an insert into the text (and possibly a portion has been removed too).
removeGives notification that a portion of the text has been removed.
caretTo track whenever the caret position has been changed.
performInvokes the given method if enter was pressed in an editable and enabled textfield.
Keyboard-actions
OperationAction
Right arrowMoves insertion point one character to the right
Left arrowMoves insertion point one character to the left
Ctrl-right arrowMoves insertion point to beginning of next word
Ctrl-left arrowMoves insertion point to beginning of previous word
HomeMoves insertion point to beginning of field
EndMoves insertion point to end of field
+ShiftExtends selection
BackspaceDeletes the previous character
DeleteRemoves the following character
Ctrl-A, Ctrl-SlashSelects all
Ctrl-BackslashDeselects all
Ctrl-XCuts selected text into the clipboard
Ctrl-CCopies selected text into the clipboard
Ctrl-VPastes the clipboard content
Tab, Shift-TabNavigate forward, backward