UI.TextField
| Name |
Mandatory |
Description |
Default |
Type |
⬅️ Input |
|
The value is ignored. |
|
None |
Output ➡️ |
|
The value produced when changed. |
|
Any |
Variable |
No |
The variable that holds the input value. |
none |
StringVar(String) |
JustifyWidth |
No |
Whether to take up all available space for its desired width. Takes priority over Desired Width. |
false |
Bool |
DesiredWidth |
No |
The desired width of the text field. |
none |
FloatVar(Float)None |
ClipText |
No |
Whether to clip the text if it exceeds the width of the text field. Or expand the text field to fit the text. |
true |
Bool |
Multiline |
No |
Support multiple lines. |
false |
Bool |
Password |
No |
Support multiple lines. |
false |
Bool |
Hint |
No |
Hint to show in the text field. |
none |
StringVar(String)None |
A widget where text can be entered.
Examples
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 | @wire(ui-wire {
UI.Window(
Position: @f2(0 0)
Anchor: Anchor::Center
Width: 200
Height: 200
Flags: [WindowFlags::NoResize]
Contents: {
; read-only
UI.TextField("Lorem ipsum dolor sit amet")
}
)
} Looped: true)
{ui-behavior: ui-wire}
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 | @wire(ui-wire {
UI.Window(
Position: @f2(0 0)
Anchor: Anchor::Center
Width: 200
Height: 200
Flags: [WindowFlags::NoResize]
Contents: {
; exposing a new variable
UI.TextField(text)
}
)
} Looped: true)
{ui-behavior: ui-wire}
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 | @wire(ui-wire {
UI.Window(
Position: @f2(0 0)
Anchor: Anchor::Center
Width: 200
Height: 200
Flags: [WindowFlags::NoResize]
Contents: {
Once({
"Lorem ipsum dolor sit amet" >= text
})
UI.TextField(
Variable: text
Multiline: false
)
}
)
} Looped: true)
{ui-behavior: ui-wire}
|