A multiple-line text input field on a form.

Syntax

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

<oRef>

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

<container>

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

<name expC>

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

Properties

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

Property

Default

Description

anchor

0 – None

How the Editor object is anchored in its container (0=None, 1=Bottom, 2=Top, 3=Left, 4=Right, 5=Center, 6=Container)

baseClassName

EDITOR

Identifies the object as an instance of the Editor class

border

true

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

className

(EDITOR)

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

colorHighlight

WindowText
/Window

The color of text in the Editor object that is not affected by embedded color formatting while the Editor object has focus

colorNormal

WindowText
/Window

The color of text in the Editor object that is not affected by embedded color formatting when the Editor object does not have focus

columnNo

1

The current column number in the Editor

cuaTab

true

Whether pressing Tab follows CUA behavior and moves to next control, or inserts tab in text

dataLink

 

The Field object that is linked to the Editor object

evalTags

true

Whether to evaluate any HTML formatting tags in the text or display them as-is

lineNo

1

The current line number in the editor

marginHorizontal

 

The horizontal margin between the text and its rectangular frame

marginVertical

 

The vertical margin between the text and its rectangular frame

modify

true

Whether the text is editable or not

popupEnable

true

Whether the Editor object’s context menu is available

scrollBar

Auto

When a scroll bar appears for the Editor object (0=Off, 1=On, 2=Auto, 3=Disabled)

value

 

The string currently displayed in the Editor object

wrap

true

Whether to word-wrap the text in the editor

 

Event

Parameters

Description

key

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

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

onChange

 

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

onDrop

<left expN>
<top expN>
<type expC>
<name expC>

When the mouse button is released over the Editor's display area during a Drag&Drop operation

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

paste( )

 

Copies text from the Windows clipboard to the current cursor position

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

Use an Editor component to display and edit multi-line text. To display the text but not allow changes, set the modify property to false. The Editor component understands and displays basic HTML formatting tags. It has a context menu that is accessible by right-clicking the editor (unless its popupEnable property is false). The context menu lets you find and replace text, toggle word wrapping and HTML formatting, and show or hide the Format toolbar.

 

Supported HTML tags available in the editor:

 

Tag              Description

------------ ------------------

br                 LineBreakTag

p                  ParagraphTag

font              FontTag

i                   ItalicTag

b                  BoldTag

u                  UnderlineTag

h1                Header1Tag

h2                Header2Tag

h3                Header3Tag

h4                Header4Tag

h5                Header5Tag

h6                Header6Tag

img               ImgTag

a                  AnchorTag

strong           StrongTag

em                EmTag

big                BigTag

small             SmallTag

cite               CiteTag

address        AddressTag

strike           StrikeoutTag

tt                  TypewriterTag

code            CodeTag

sub              SubscriptTag

sup              SuperscriptTag

blockquote  BlockQuoteTag

ul                UnorderedListTag

ol                OrderedListTag

li                 ListItemTag

pre             PreformattedTag

font color    FontColorTag

font size      FontSizeTag

font face     FontFaceTag

a href         HyperLinkTag

a name       InternalAnchorTag

p align        ParaAlignTag

h1 align      Header1AlignTag

h2 align      Header2AlignTag

h3 align      Header3AlignTag

h4 align      Header4AlignTag

h5 align      Header5AlignTag

h6 align      Header6AlignTag

img src         ImgSrcTag

img width     ImgWidthTag

img height    ImgHeightTag

img align      ImgAlignTag

img border   ImgBorderTag

img alt           ImgAltTag

img hspace  ImgHorzSpace

img vspace  ImgVertSpace