Vision - Text Field
Component Palette Icon:​
Description​
The Text Field component is used for input of any single-line text. This component will accept any alpha-numeric input. If you're looking for a numeric field, see the Vision - Numeric Text Field.
This field features a protected mode. When you enable the protectedMode property, the field is not editable even when it receives input focus. The user must double click on the field or press enter in order to edit the field. When they are done (press enter again or leave the field), the field becomes non-editable again.
The Text Field also supports the reject updates during edit feature. This feature ignores updates coming from property bindings while the component is being edited by a user.
Properties​
Name | Description | Property Type | Scripting | Category |
---|---|---|---|---|
Background | The background color of the text box (when editable). | Color | .editableBackground | Appearance |
Border | The border surrounding this component. Options are No border, Etched (Lowered), Etched (Raised), Bevel (Lowered), Bevel (Raised), Bevel (Double), Field Border, and Line Border. Note: The border is unaffected by rotation. Changed in 8.1.21 As of 8.1.21, the "Button Border" and "Other Border" options are removed. | Border | .border | Common |
Commit On Focus Loss | If true, any pending edit will take effect when focus is lost. If false, the user must press ENTER for an edit to take effect. | boolean | .commitOnFocusLost | Behavior |
Cursor | The mouse cursor to use when hovering over this component. Options are: Default, Crosshair, Text, Wait, Hand, Move, SW Resize, or SE Resize. | int | .cursorCode | Common |
Defer Updates | When true, the 'text' property will not fire updates while typing, it will wait for Enter to be pressed. | boolean | .deferUpdates | Behavior |
Editable? | If true, this is an input box, if false, this is display-only. | boolean | .editable | Behavior |
Enabled | If disabled, a component cannot be used. | boolean | .componentEnabled | Common |
Font | Font of text on this component. | Font | .font | Appearance |
Foreground Color | The foreground color of the component. | Color | .foreground | Appearance |
Horizontal Alignment | Determines the alignment of the label's contents along the X axis. | int | .horizontalAlignment | Layout |
Maximum Characters | The text box will be limited to this number of characters. Use -1 for unlimited. | int | .maxChars | Behavior |
Mouseover Text | The text that is displayed in the tooltip which pops up when the user mouses over of this component. | String | .toolTipText | Common |
Name | The name of this component. | String | .name | Common |
Non-Editable Background | The background color to use when this text box is non-editable. | Color | .nonEditableBackground | Appearance |
Protected Mode? | If true, users will need to double-click in the field in order to edit the text. | boolean | .protectedMode | Behavior |
Quality | The data quality code for any Tag bindings on this component. | QualityCode | .quality | Data |
Reject Updates During Edit | If true, this field will not accept updates from external sources (like DB bindings) while the user is editing the field. | boolean | .rejectUpdatesDuringEdit | Behavior |
Styles | Contains the component's styles. | Dataset | .styles | Appearance |
Text | Text of this component. | String | .text | Data |
Touchscreen Mode | Controls when this input component responds if touchscreen mode is enabled. | int | .touchscreenMode | Behavior |
Touchscreen Keyboard Layout | New in 8.1.28 Sets the touchscreen keyboard layout to use for this component. | String | .keyboardName | Behavior |
Visible | If disabled, the component will be hidden. | boolean | .visible | Common |
Deprecated Properties​
Name | Description | Property Type | Scripting | Category |
---|---|---|---|---|
Data Quality | The data quality code for any Tag bindings on this component. | int | .dataQuality | Deprecated |
Scripting​
Scripting Functions​
See the Vision - Text Field Scripting Functions page for the full list of scripting functions available for this component.
Event Handlers​
Event handlers allow you to run a script based off specific triggers. See the full list of available event handlers on the Component Events page
Customizers​
Examples​
#The following code will return the value of the text box's previous value into a variable.
#This code is fired on the propertyChange event for this component.
oldValue = event.source.oldValue
Titled Panel​
Property Name | Value |
---|---|
Border | Bevel (Raised) |
Font | Dialog, Bold, 14 |
Horizontal Alignment | Center |