Top  | Previous | Next

          Text Field

A basic Text<br>
Field component

A basic Text
Field component

 

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 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

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

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

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 'text' property will not fire updates while typing, it will wait for Enter to be pressed.

Scripting name

deferUpdates

Data type

boolean

Protected Mode?

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

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

Maximum Characters

The text box will be limited to this number of characters. Use -1 for unlimited.

Scripting name

maxChars

Data type

int

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

Text

Text of this component

Scripting name

text

Data type

String

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