@...EDIT

From Recital Documentation Wiki
Revision as of 14:28, 3 June 2009 by Yvonnemilne (Talk | contribs)

Jump to: navigation, search

Class

Screen Forms


Purpose

Create a FoxPro style text-editing region for data input


Syntax

@<expN1>,<expN2> EDIT <memvar> | <field>

SIZE <expN3>,<expN4>[, <expN5>]

[COLOR SCHEME <expN6> | COLOR <expC1>]

[DEFAULT <exp>]

[ENABLE | DISABLE]

[FONT <expC2>]

[FUNCTION <expC3>]

[MESSAGE <expC4>]

[NOMODIFY]

[SCROLL]

[STYLE <expC5>]

[TAB]

[VALID <expL1> [ERROR <expC6>]]

[WHEN <expL2>]


See Also

@...GET, @...SAY, APPEND, CHANGE, EDIT, READ, SET COLOR, SET COMPATIBLE, SET FILETYPE


Description

The @...EDIT command can be used to create a FoxPro style text-editing region. The @…EDIT command can be used to edit a memory variable, a memo field or a character field. The text-editing region is displayed at the row and column coordinates specified by <expN1> and <expN2>.

SIZE <expN3>,<expN4> [,<expN5>]

The SIZE <expN3>,<expN4> clause defines the size of the text-editing region. <expN3> is the height and <expN4> is the width. The SIZE clause must be used. The optional <expN5> specifies the number of characters that can be edited.

COLOR SCHEME <expN6> | COLOR <expC1>

The COLOR SCHEME | COLOR clause is used to define the foreground and background colors of the edit region. The <expN6> is the number of a color scheme. The <expC1> is a color pair in the format foreground / background.

DEFAULT <exp>

The DEFAULT clause is used to specify a default value for the variable being edited in the edit region.

ENABLE | DISABLE

The DISABLE keyword can be included to prevent the edit region from being selected. By default, edit regions are enabled.

FONT <expC2>

The FONT clause specifies the font to be used.

FUNCTION <expC3>

The FUNCTION clause determines the text justification. The following options are supported in <expC3>:


<expC3> Style
I Centers text.
J Right-justifies text.


MESSAGE <expC4>

The MESSAGE clause is used to specify a text message, <expC4>, of up to 80 characters, which will be displayed in the message line when the edit region is selected.

NOMODIFY

The NOMODIFY keyword specifies that the edit region can be displayed, but the contents cannot be edited.

SCROLL

If the SCROLL keyword is included, a scroll bar will be displayed on the edit region when the text exceeds the displayed size.

STYLE <expC5>

The STYLE clause defines the font style. The following style qualifiers are supported in <expC5>:


<expC5> Style
B Bold
I Italic
U Underline


VALID <expL1> [ERROR <expC6>]

If the VALID clause is included and changes are made to the text in the edit region, <expL1> must evaluate to .T. (true) before the changes are saved. The optional ERROR clause causes the character expression <expC6> to be displayed when <expL1> evaluates to .F. (false).

TAB

If the TAB keyword is included, tabs can be inserted into the edit region text using the tab key. The default behavior is for the tab key to cause the cursor to move to the next control.

WHEN <expL2>

The text-editing region can only be used when the <expL2> condition evaluates to true (.T.).


Example

@01,01 edit customer->notes; 
  size 3,10
  read


Products

Recital Mirage Server, Recital Terminal Developer