Top  | Previous | Next

Numeric Text Field

A basic Numeric<br>
Text Field

A basic Numeric
Text Field

Numeric Text Field<br>
editing a floating-<br>
point value

Numeric Text Field
editing a floating-
point value

Description

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

Appearance

Font

Font of text of this component

Scripting name

font

Data type

Font

Foreground Color

The foreground color of the component.

Scripting name

foreground

Data type

Color

Background

The background color of the text box (when editable)

Scripting name

editableBackground

Data type

Color

Non-Editable Background

The background color to use when this text box is non-editable

Scripting name

nonEditableBackground

Data type

Color

Flags

expert

Decimal Format

The formatting string used for displaying numbers.

Scripting name

decimalFormat

Data type

String

Suffix

A string to display after the value.

Scripting name

suffix

Data type

String

Antialias

Draw with antialias on? Makes text smoother

Scripting name

antialias

Data type

boolean

Flags

expert

Styles

Contains the component's styles

Scripting name

styles

Data type

Dataset

Flags

bindable | expert

Behavior

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.

Scripting name

useBounds

Data type

boolean

Error on Out-of-Bounds

Show an error message if the user input is out-of-bounds?

Scripting name

errorOnOutOfBounds

Data type

boolean

Out Of Bounds Message

The error message to display if input is out-of-bounds

Scripting name

outOfBoundsMessage

Data type

String

Flags

expert

Editable?

If true, this is an input box, if false, this is display-only.

Scripting name

editable

Data type

boolean

Defer Updates

When true, the value properties will not fire updates while typing, it will wait for Enter to be pressed.

Scripting name

deferUpdates

Data type

boolean

Flags

expert

Protected Mode?

If true, users will need to double-click in the field in order to edit the value.

Scripting name

protectedMode

Data type

boolean

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.

Scripting name

commitOnFocusLost

Data type

boolean

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.

Scripting name

rejectUpdatesDuringEdit

Data type

boolean

Flags

expert

Touchscreen Mode

Controls when this input component responds if touchscreen mode is enabled.

Scripting name

touchscreenMode

Data type

int

Flags

expert

Values

0

None

1

Single-Click

2

Double-Click

Common

Name

The name of this component.

Scripting name

name

Data type

String

Flags

bindable

Enabled

If disabled, a component cannot be used.

Scripting name

componentEnabled

Data type

boolean

Visible

If disabled, the component will be hidden.

Scripting name

visible

Data type

boolean

Flags

bindable

Border

The border surrounding this component. NOTE that the border is unaffected by rotation.

Scripting name

border

Data type

Border

Mouseover Text

The text that is displayed in the tooltip which pops up on mouseover of this component.

Scripting name

toolTipText

Data type

String

Cursor

The mouse cursor to use when hovering over this component.

Scripting name

cursorCode

Data type

int

Values

0

Default

1

Crosshair

2

Text

3

Wait

12

Hand

13

Move

4

SW Resize

5

SE Resize

6

NW Resize

7

NE Resize

8

N Resize

9

S Resize

10

W Resize

11

E Resize

Data

Number Type

What type of numbers should this field accept?

Scripting name

mode

Data type

int

Values

0

Integer

3

Double

1

Long

2

Float

Maximum

The maximum value (inclusive), if useBounds is true.

Scripting name

maximum

Data type

double

Flags

bindable

Minimum

The minimum value (inclusive), if useBounds is true.

Scripting name

minimum

Data type

double

Flags

bindable

Value (Integer)

The value as an integer. Make sure you use the value property that corresponds to your Number Type setting.

Scripting name

intValue

Data type

int

Flags

bindable

Value (Double)

The value as a double. Make sure you use the value property that corresponds to your Number Type setting.

Scripting name

doubleValue

Data type

double

Flags

bindable

Value (Long)

The value as a long. Make sure you use the value property that corresponds to your Number Type setting.

Scripting name

longValue

Data type

long

Flags

bindable

Value (Float)

The value as a float. Make sure you use the value property that corresponds to your Number Type setting.

Scripting name

floatValue

Data type

float

Flags

bindable

Data Quality

The data quality code for any tag bindings on this component.

Scripting name

dataQuality

Data type

int

Flags

bindable | expert

Layout

Horizontal Alignment

Determines the alignment of the label's contents along the X axis

Scripting name

horizontalAlignment

Data type

int

Flags

expert

Values

2

Left

0

Center

4

Right

10

Leading

11

Trailing

Scripting

Events

The following event sets are fired by this component. See Component Event Handlers to learn more.

mouse
mouseMotion
focus
propertyChange
key

 

Scripting Functions

getSelectedText()

 

Returns the currently selected or highlighted text in the text field.

Parameters

none

Returns

String