[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
| @ ... EDIT - Text Edit Regions  |
+---------------------------------+
@ <row, column> EDIT <var>
        [FUNCTION <expC2>]
        [DEFAULT <expr>]
        SIZE <expN1>, <expN2>
                [, <expN3>]
        [ENABLE | DISABLE]
        [MESSAGE <expC3>]
        [VALID <expL1>
                [ERROR <expC4>]]
        [WHEN <expL2>]
        [NOMODIFY]
        [SCROLL]
        [TAB]
        [COLOR SCHEME <expN4>
        | COLOR <color pair list>]

-----------------------------------
Creates a text editing region.
-----------------------------------

This command creates a rectangular text editing region for editing
<var>.  <var> can be a memory variable, memory variable array element,
database field or memo field.  <var> must be of character type, and is
typically a memo field.  All standard FoxPro editing features are
available in the text editing region - cutting, copying, pasting and so
on.  The text in the editing region can be scrolled vertically.
Word-wrap is automatic.

Unlike other FoxPro controls (check boxes, radio or push buttons, ... )
this command uses @...EDIT in its syntax instead of @...GET.

When a text editing region is activated with READ, the contents of <var>
are displayed in the region for editing.  When you exit the text editing
region, its contents can be saved back to <var>.

To save your changes, by default, you can press Tab or Ctrl+Tab.  This
exits the editing region, saves your changes, and moves to the next GET
field or object.  If the TAB keyword is specified, you must press
Ctrl+Tab instead.  See the discussion of the TAB keyword later in this
section for more information.

To exit the editing region without saving your changes, press Escape.
Note, however, that if you're editing a memo field, and VALID has been
specified, pressing Escape may or may not save the changes depending on
the value returned by the VALID.  See the discussion of VALID later in
this section for more information.

Clauses
-------

<row, column>
        Numeric coordinates (zero or greater) that specify upper left hand
corner of text editing region.

EDIT <var>
        Memory variable, array element, database field or memo field that
contains text to be edited.  Must be character or memo field type.  If
Escape pressed, <var> remains unchanged.

FUNCTION <expC2>
        Permissible function codes are:

        I       centers text

        J       right-justifies text. Takes precedence over I function code.

DEFAULT <expr>
        Creates memory variable if one specified does not exist.

SIZE <expN1>, <expN2> [, <expN3>]
        <expN1> specifies height of editing region in rows; <expN2> specifies
width in columns; <expN3> specifies number of character that can be
edited.

ENABLE | DISABLE
        Allows or prevents activation of text editing region when READ is
issued.  SHOW GETS ENABLED can be used to enable a disabled GET.

MESSAGE <expC3>
        Displays <expC3> when text editing region is selected.  By default, the
message is displayed centered on the last line of the screen.  The
location of the message can be controlled with SET MESSAGE.

VALID <expL1>
        Evaluated when you save your changes and exit text editing region by
pressing Tab, Ctrl+Tab or Shift+Tab.  Typically, <expL1> is a UDF.
User-defined functions let you do many things, including: selecting,
enabling or disabling other GET fields or objects; initiating a Browse
session; invoking another data entry screen; or positioning on a new
record.  CLEAR READ may be included in the user-defined function to
terminate the READ.

        If you press Tab, Ctrl+Tab or Shift+Tab to save memo field changes and
exit the editing region, and VALID evaluates to true (.T.), your changes
are saved.  If you press Tab, Ctrl+Tab or Shift+Tab to save your memo
field changes and VALID evaluates to false (.F.), a message is displayed
prompting you for proper input.  If you then press Escape to exit the
editing region, your changes are saved.  However, editing a memory
variable, array element or character type database field and pressing
Escape when VALID evaluates to false discards your changes.

ERROR <expC4>
        Replaces default error message with <expC4>.

WHEN <expL2>
        Allows or prohibits editing in region.  Often, <expL2> is a UDF.

NOMODIFY
        Displays text editing region but doesn't allow editing.

SCROLL
        Places scroll bar to right of text editing region, if text is too long
to fit entirely into the text editing region.

TAB
        By default, pressing the Tab key does not insert a tab into text in a
text editing region.  If you include the TAB keyword, pressing Tab
inserts a tab at the current cursor location.  Press Ctrl+Tab to save
your changes, exit the text editing region and move to the next GET
field or object.

COLOR SCHEME <expN4> |
COLOR <color pair list>
        Overrides current color scheme by specifying a different pre-defined
color scheme, or by specifying a list of color pairs.  By default, the
colors of text editing regions are derived from the color scheme of the
current output window.

        Color Pair Controls
        1       Not used by text editing regions
        2       Enabled text editing region
        3       Scroll bar*
        4       Not used by text editing regions
        5       Message
        6       Selected text editing region
        7       Not used by text editing regions
        8       Not used by text editing regions
        9       Not used by text editing regions
        10      Disabled text editing region

        * Controls drawn in background color.  Bar drawn in dim of foreground
color.

+---------------------------------+
|             Examples            |
+---------------------------------+
***** Editing region with right justified text
STORE 'This will be edited' TO text
@ 4,2 EDIT text FUNCTION 'J' SIZE 5,50
READ

***** Valid DEFAULT clauses
@ 5,0 EDIT text DEFAULT 'This will be edited' SIZE 5,50
READ

@ 5,0 EDIT text DEFAULT SPACE(20) SIZE 5,50
READ

***** Override color defaults
STORE 'To be edited' TO text
@ 5,0 EDIT text COLOR SCHEME 4 SIZE 5,50
READ

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson