A single-line text input field on a form.

Syntax

[<oRef> =] new Entryfield(<container> [,<name expC>])

<oRef>

A variable or property—typically of <container>—in which to store a reference to the newly created Entryfield object.

<container>

The container—typically a Form object—to which you’re binding the Entryfield object.

<name expC>

An optional name for the Entryfield object. If not specified, the Entryfield class will auto-generate a name for the object.

Properties

The following tables list the properties, events, and methods of interest in the Entryfield class.

Property

Default

Description

baseClassName

ENTRYFIELD

Identifies the object as an instance of the Entryfield class

border

true

Whether the Entryfield object is surrounded by the border specified by borderStyle

className

(ENTRYFIELD)

Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName

colorHighlight

 

The color of the text in the Entryfield object when the object has focus

colorNormal

WindowText
/Window

The color of the text in the Entryfield object when the object does not have focus

dataLink

 

The Field object that is linked to the Entryfield object

function

 

A text formatting function

maxLength

 

The maximum length of the text in the Entryfield object

memoEditor

 

The memo editor control used when editing a memo field

phoneticLink

 

The control that mirrors the phonetic equivalent of the current value

picture

 

Formatting template

selectAll

true

Whether the entryfield contents are initially selected when the Entryfield object gets focus

validErrorMsg

Invalid input

The message that is displayed when the valid event fails

validRequired

false

Whether to fire the valid event even when no change has been made

value

 

The value currently displayed in the Entryfield object

 

Event

Parameters

Description

key

<char expN>,
<position expN>,
<shift expL>,
<ctrl expL>

When a key is pressed. Return value may change or cancel keystroke.

onChange

 

After the string in the Entryfield object has changed and the Entryfield object loses focus, but before onLostFocus

onKey

<char expN>,
<position expN>,
<shift expL>,
<ctrl expL>

After a key has been pressed (and the key event has fired), but before the next keypress.

valid

 

When attempting to remove focus. Must return true, or focus remains.

 

Method

Parameters

Description

copy( )

 

Copies selected text to the Windows clipboard

cut( )

 

Cuts selected text and to the Windows clipboard

keyboard( )

<expC>

Simulates typed user input to the Entryfield object

paste( )

 

Copies text from the Windows clipboard to the current cursor position

showMemoEditor( )

 

Opens the specified memoEditor

undo( )

 

Reverses the effects of the most recent cut( ), copy( ), or paste( ) action

 

The following table lists the common properties, events, and methods of the Entryfield class:

Property

 

Event

 

Method

before
borderStyle

dragEffect

enabled

fontBold

fontItalic

fontName

fontSize

fontStrikeout

fontUnderline

form

height

helpFile

helpId

hWnd

id
left

mousePointer

name

pageno

parent

printable

speedTip

statusMessage

systemTheme

tabStop

top

visible

width

beforeRelease
onClose

onDesignOpen

onDragBegin

onGotFocus

onHelp

onLeftDblClick

onLeftMouseDown

onLeftMouseUp

onLostFocus

onMiddleDblClick

onMiddleMouseDown
onMiddleMouseUp

onMouseMove

onOpen

onRightDblClick

onRightMouseDown

onRightMouseUp

when

drag( )
move( )

release( )

setFocus( )

Description

Entryfield objects are the primary data display and entry component.