Textbox
Textbox component for Universal Apps
A textbox lets users enter and edit text.
Textbox

Textbox Types
Textboxes can be switched to accept specific types, such as passwords, numbers, or emails.
Password Type
A password textbox will mask the input.

Number Type
Only accepts numbers. Some browsers will include up and down arrows to increase and decrease the current value.

Multiline
You can create a multiline textbox by using the -Multiline parameter. Pressing enter will add a new line. You can define the number of rows and the max number of rows using -Rows and -RowsMax.
Interaction
Retrieving a textbox value
You can use Get-UDElement to get the value of a textbox
Setting the textbox value
Icons
You can set the icon of a textbox by using the -Icon parameter and the New-UDIcon cmdlet.
Masking
You can use the -MaskPattern to define a mask for the textbox. The following is an example of a textbox mask.
The definition can contain
0- any digita- any letter*- any charother chars which are not in custom definitions supposed to be fixed
[]- make input optional{}- include fixed part in unmasked value`- prevent symbols shift back
If definition character should be treated as fixed it should be escaped by \\ (E.g. \\0).
The masking for the textbox is controlled by imaskjs.
OnEnter
The -OnEnter event handler is executed when the user presses enter in the text field. It is useful for performing other actions, like clicking a button, on enter.
OnBlur
The -OnBlur event handler is executed when the textbox loses focus.
OnValidate
Use the -OnValidate event handler to validate input typed in the textbox.
API
Last updated
Was this helpful?