Skip to main content
Version: 8.1

Vision - Numeric Text Field

Component Palette Icon

The Numeric Text Field is similar to the standard Text Field, except that it is specialized for use with numbers. Instead of a "text" property, it has four numeric "value" properties. Which one you use depends on the mode of the text box.

Like the standard Text Field, this text field can operate in protected mode. When you enable the protected 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 Numeric 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​

PropertyDescriptionProperty TypeScriptingCategory
BackgroundThe background color of the text box (when editable).Color.editableBackgroundAppearance
BorderThe border surrounding this component. 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.borderCommon
Commit On Focus LossIf 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.commitOnFocusLostBehavior
CursorThe mouse cursor to use when hovering over this component. Options are: Default, Crosshair, Text, Wait, Hand, Move, SW Resize, or SE Resize.int.cursorCodeCommon
Decimal FormatThe formatting string used for displaying numbers.String.decimalFormatAppearance
Defer UpdatesWhen true, the value properties will not fire updates while typing, it will wait for Enter to be pressed.boolean.deferUpdatesBehavior
Editable?If true, this is an input box, if false, this is display-only.boolean.editableBehavior
EnabledIf disabled, a component cannot be used.boolean.componentEnabledCommon
Error on Out-of-BoundsShow an error message if the user input is out-of-bounds?boolean.errorOnOutOfBoundsBehavior
FontFont of text on this component.Font.fontAppearance
Foreground ColorThe foreground color of the component.Color.foregroundAppearance
Horizontal AlignmentDetermines the alignment of the label's contents along the X axis.int.horizontalAlignmentLayout
MaximumThe maximum value (inclusive), if useBounds is true.double.maximumData
MinimumThe minimum value (inclusive), if useBounds is true.double.minimumData
Mouseover TextThe text that is displayed in the tooltip which pops up on mouseover of this component.String.toolTipTextCommon
NameThe name of this component.String.nameCommon
Non-Editable BackgroundThe background color to use when this text box is non-editableColor.nonEditableBackgroundAppearance
Number TypeWhat type of numbers should this field accept?int.modeData
Out Of Bounds MessageThe error message to display if input is out-of-bounds.String.outOfBoundsMessageBehavior
Protected Mode?If true, users will need to double-click in the field in order to edit the value.boolean.protectedModeBehavior
QualityThe data quality code for any Tag bindings on this component.QualityCode.qualityData
Reject Updates During EditIf true, this field will not accept updates from external sources (like DB bindings) while the user is editing the field.boolean.rejectUpdatesDuringEditBehavior
StylesContains the component's styles.Dataset.stylesAppearance
SuffixA string to display after the value.String.suffixAppearance
Touchscreen ModeControls when this input component responds if touchscreen mode is enabled.int.touchscreenModeBehavior
Use Bounds?Only allows user-entered values between a minimum and maximum. Unless you turn on "Error on out-of-bounds", user-entered values will be silently modified to be in-bounds.boolean.useBoundsBehavior
Value (Double)The value as a double. Make sure you use the value property that corresponds to your Number Type setting.double.doubleValueData
Value (Float)The value as a float. Make sure you use the value property that corresponds to your Number Type setting.float.floatValueData
Value (Integer)The value as an integer. Make sure you use the value property that corresponds to your Number Type setting.int.intValueData
Value (Long)The value as a long. Make sure you use the value property that corresponds to your Number Type setting.long.longValueData
VisibleIf disabled, the component will be hidden.boolean.visibleCommon

Deprecated Properties​

PropertyDescriptionProperty TypeScriptingCategory
Data QualityThe data quality code for any Tag bindings on this component.int.dataQualityDeprecated

Scripting​

See the Vision - Numeric 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​

Code Snippet
#The following script can be executed on a mouse released event handler.
#This would write the selected text to a custom property called highlightedText.

event.source.highlightedText = event.source.getSelectedText()

2-digit Numeric Format​

Property NameValue
BorderField Border
Number TypeFloat
FontDialog, BoldItalic, 15
Decimal Format#,##0.00