TextField
A single-line text editor. For multiple lines, use TextArea.
Theme DSL
"text_field" {
columns( value : Number )
caretImage( image : Image )
caretImage( images : NamedImages, imageName : String )
font( value : Font )
selectionColor( value : Color )
selectionColor( value : String )
textColor( value : Color )
textColor( value : String )
}
TextField inherits all the features of Region.
Properties
Along with caretIndex, this defines the extent of the selection. If anchorIndex == caretIndex, then nothing is selected.
If set to true, the prefColumnCount and minColumnCount will use the widths of digits, rather than the letter W
to calculate evalPrefWidth and evalMinWidth.
Text to display when text is blank.
The maximum of anchorIndex and caretIndex
The minimum of anchorIndex and caretIndex
True iff caretIndex != anchorIndex
Functions
Each subclass of node can determine the minimum width it requires. This can be overridden on an ad-hoc basis using overrideMinHeight. The default implementation returns 0.
Each subclass of node can determine the minimum width it requires. This can be overridden on an ad-hoc basis using overrideMinWidth. The default implementation returns 0.
Each subclass of node can determine its preferred height. As most nodes are composed of smaller nodes, this is typically calculated using evalPrefWidth of the child nodes, with extra added for spacing, padding and borders.
Each subclass of node can determine its preferred width. As most nodes are composed of smaller nodes, this is typically calculated using evalPrefWidth of the child nodes, with extra added for spacing, padding and borders.
Sets TextField.expectDigits = true and TextField.prefColumnCount to digits.