Top  | Previous | Next

Formatted Text Field

With an email-address<br>
regular expression filter

With an email-address
regular expression filter

With a US phone-number<br>
mask formatter

With a US phone-number
mask formatter

Description

This specialized text field is used for alphanumeric text input that must match some specific pattern or needs to be formatted in a specific way. It operates in two modes:

 

Formatted Mask

In this mode, input is automatically formatted and restricted based on a format mask. For example, a format mask like: (###) ###-#### will allow the entry of a 10-digit US phone number. The formatting characters are automatically inserted if the user does not type them in. Any other characters are restricted. The following characters may be used in a formatted mask pattern:

#

Any valid number, Such as 0-9.

'

Escape character, used to escape any of the special formatting characters.

U

Any letter. All lowercase letters will be mapped to upper case automatically.

L

Any letter. All upper case letters will be mapped to lower case automatically.

A

Any letter or number.

?

Any letter, case is preserved.

*

Anything.

H

Any hex character (0-9, a-f or A-F).

Examples:

##U-####/UU

A product code with a specifc format, like 28E-8213/AR

0xHHHH

A hex digit, automatically prepends "0x" no the front. e.g. "0x82FF"

#UUU###

A California license plate, eg. 4ABC123

 

Regular Expression

In this mode, input is validated against a regular expression. A regular expression is a special string that defines a set of allowed strings. See http://en.wikipedia.org/wiki/Regular_expression. Any input that matches the given regular expression is allowed, and input that doesn't match, is restricted. And yes, while powerful, regular expressions are decidedly difficult to decipher.

Examples:

\p{Upper}\p{Lower}*, \p{Upper}\p{Lower}*

A name, formatted such as Smith, John

\d{3}-\d{2}-\d{4}

A US social security number, like 123-45-6789

\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}

A network IPv4 address, like 67.82.120.116

^[a-f0-9A-F]{6}$

A six-digit hexadecimal number.

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 Color

The background color of the component.

Scripting name

background

Data type

Color

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

Validation Mode

Select regular expression or mask-driven field validation

Scripting name

validationMode

Data type

int

Values

1

Regular Expression

2

Formatted Mask

Formatted Mask Pattern

Formatted Mask Validation Pattern

Scripting name

formattedMaskPattern

Data type

String

Reg Ex Pattern

Regular Expression Validation Pattern

Scripting name

validationPattern

Data type

String

Allows Invalid Text

Allows Invalid text to Commit

Scripting name

allowsInvalid

Data type

boolean

Overwrites Text

Overwrites text while typing

Scripting name

overwriteMode

Data type

boolean

Commit While Typing

Commits valid text while user is typing

Scripting name

commitsOnValidEdit

Data type

boolean

Focus Lost Behavior

Controls how a transaction can be committed

Scripting name

focusLostBehavior

Data type

int

Values

2

Revert

1

Commit or Revert

0

Commit

3

Persist

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

Contents of this Text Field

Scripting name

text

Data type

String

Committed Value

Committed Text Value

Scripting name

committedValue

Data type

String

Flags

bindable | expert

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

This component has no special scripting functions.