widget_field
The rows a text_field, text_area or code reads: what may be typed and how the editor behaves.
On this page
ui · 14 properties · UI
The rows a text_field, text_area or code reads: what may be typed and how the editor behaves.
In a scene, widget_field is the node key that applies it. A script reaches each property below as a field on node.widget_field: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.widget_field.get() and node.widget_field.set(table).
Properties
| property | type | default | description |
|---|---|---|---|
caret_at_end |
bool | true |
Put the caret at the end of a text_field, text_area or code's text when it first takes focus; off, at the start |
clip_text |
bool | true |
Cut a text_field's text at its edge; off, the field grows to show it whole |
editable |
bool | true |
Let the reader change a text_field, text_area or code's text; off, it can be neither edited nor selected |
line_break |
enum | word_smart |
Where a text_area's wrapped line may break One of word_smart, word, arbitrary. |
max_length |
float | 0 |
The most characters a text_field takes; 0 is no limit At least 0. |
numeric |
bool | false |
Keep a text_field to digits, a sign and a point |
placeholder |
string | — | What a text_field or text_area shows while it is empty |
prefix |
string | — | Text drawn before a text_field's or text_area's text |
secret |
bool | false |
Draw a text_field's text as dots, for a password |
submit_key |
string | — | The chord that submits a text_field, as Enter or cmd+Enter; empty is Enter. A text_area submits when focus leaves it whatever this says |
suffix |
string | — | Text drawn after a text_field's or text_area's text |
tab_inserts |
bool | false |
Let Tab type a tab into a text_field, text_area or code rather than move focus on |
tab_size |
int | 8 |
Spaces between a text_field's or text_area's tab stops Range 1–64. |
text_align |
enum | start |
Where what a text_field or text_area edits sits in its width One of start, center, end. |