Re: Anyone with a command reference...
- From: "Matthew L Reed" <nousenetspam at dead ice dot us>
- Date: Wed, 7 Dec 2005 15:32:11 -0800
This is what is in the FPW 2.6a help file (I hope Microsoft doesn't sue me
for this). They took it out of the VFP docs - never mind that there are
still systems out there using it and we still have a need for this info...
---------------------------------------
@ ... GET Command
Creates an editing region.
Syntax
@ <row, column> GET <memvar> | <field>
[FUNCTION <expC1>]
[PICTURE <expC2>]
[FONT <expC3>[, <expN1>]]
[STYLE <expC4>]
[DEFAULT <expr1>]
[ENABLE | DISABLE]
[MESSAGE <expC5>]
[[OPEN] WINDOW <window name>]
[RANGE [<expr2>] [, <expr3>]]
[SIZE <expN2>, <expN3>]
[VALID <expL1> | <expN4> [ERROR <expC6>]]
[WHEN <expL2>]
[COLOR SCHEME <expN5> | COLOR <color pair list>]
Remarks
OPEN WINDOW is included for backward compatibility. Use @ ... EDIT instead.
Use this command to create an editing region for the contents of a memory
variable, array element or field. Use READ or READ CYCLE to activate @ ...
GET editing regions.
You can combine @ ... SAY and @ ... GET into a single command. If both the
SAY and GET clauses are included, specify a single set of coordinates <row,
column> where the @ ... SAY output begins. A space is automatically
inserted between the @ ... SAY output and the @ ... GET editing region. In
FoxPro for Windows, @ ... GET editing regions are surrounded by a black
border if the BORDER clause is included in READ.
If you use the Screen Builder to create your data entry screens, you may not
have to use @ ... GET or @ ... SAY at all. The Screen Builder automatically
generates the @ ... GETs or @ ... SAYs.
Clauses
<row, column>
Row and column are numeric expressions with values 0 or greater that
determine where the @ ... GET editing region is displayed. The first row is
number 0 on the desktop, main FoxPro window or a user-defined window. Rows
are numbered from top to bottom.
The first column is number 0 on the desktop, main FoxPro window or a
user-defined window. Columns are numbered from left to right.
When the editing region is placed in a user-defined window, the row and
column coordinates are relative to the user-defined window, not the desktop
(FoxPro for MS-DOS) or the main FoxPro window (FoxPro for Windows).
In FoxPro for Windows, a position in the main FoxPro window or in a
user-defined window is determined by the font of the main FoxPro window or
the user-defined window. Most fonts Microsoft Windows uses can be displayed
in a wide variety of sizes, and some are proportionally spaced. A row
corresponds to the height of the current font; a column corresponds to the
average width of a letter in the current font.
To facilitate precise positioning of an @ ... GET editing region in the main
FoxPro window or in a user-defined window, you can use decimal fractions for
row and column coordinates in FoxPro for Windows.
In FoxPro for MS-DOS, decimal fractions used for row and column coordinates
are rounded to the nearest integer value.
<memvar> | <field>
@ ... GET creates an editing region for the memory variable or array element
specified in <memvar> or the field specified in <field>.
@ ... GET can be used to create an editing region for a memo field. When
you use @ ... GET with a memo field, the word Memo is displayed. When READ
is issued and the memo field is selected, place the cursor on the word Memo
and press Ctrl+Home, Ctrl+PgUp or Ctrl+PgDn to open the memo editing window.
You can also double-click on Memo to open the editing window.
To exit the memo editing window and save your editing changes in FoxPro for
MS-DOS, click the window's close box or press Ctrl+W. Press Escape to
discard your changes.
To exit the memo editing window and save your changes in FoxPro for Windows,
choose Close from the window's Control menu or press Ctrl+W. Press Escape
to discard your changes.
Tip A better method for editing memo fields is using @ ... EDIT instead of
@ ... GET. @ ... EDIT creates a text editing window with a scroll bar, and
the contents of the memo field are displayed when @ ... EDIT is issued.
FUNCTION <expC1> | PICTURE <expC2>
When creating a text editing region with @ ... GET, you can include the
FUNCTION clause, the PICTURE clause or both to create an editing mask.
These clauses contain special codes that control how the memory variable,
array element or field is displayed and edited.
FUNCTION codes can be included in a PICTURE clause. In this case, the
PICTURE clause must start with @. Also, a PICTURE clause can contain
FUNCTION codes, PICTURE codes or both. Since a FUNCTION clause affects the
entire expression it can contain only FUNCTION codes.
FUNCTION
Code Purpose
A Allows alphabetic characters only (no spaces or symbols).
B Left-justifies numeric data within the output field.
D Uses the current SET DATE format.
E Edits date type data as a BRITISH date.
I Centers text within a field.
J Right-justifies text within a field.
K Selects an entire field for editing when the cursor is moved to the field.
L Displays leading zeros (instead of spaces) in numeric output. Use with
numeric data only.
M<list> Creates multiple preset choices. The list is a comma-delimited
collection of items. Individual items within the list cannot contain
embedded commas. If <memvar> or <field> initially do not contain one of the
items in the list when READ is issued, the first item in the list is
displayed. To scroll through the list, press the Spacebar or type the first
letter of an item. To choose one of the items and move to the next control,
press Enter. Use only with character data.
R Displays a format mask in an @ ... GET editing region. These mask
characters are not stored to the field when you exit the @ ... GET editing
region. Use only with character or numeric data.
S<n> Limits the display width to n characters. You can scroll within the
region with the cursor control keys. Use only with character data.
T Trims leading and trailing blanks from <memvar> or <field>.
Z Displays <memvar> or <field> as blank if its numeric value is 0. Use with
numeric data only.
! Converts alphabetic characters to upper-case. Use with character data
only.
^ Displays numeric data using scientific notation. Use with numeric data
only.
$ CURRENCY. If CURRENCY is SET LEFT, the $ function code cannot be used.
Use with numeric data only.
A PICTURE expression can include any characters, but only the characters
listed below actively participate in display and editing.
PICTURE
Code Purpose
A Allows alphabetic characters only.
L Allows logical data only.
N Allows letters and digits only.
X Allows any character.
Y Allows logical Y, y, N and n only. Converts y and n to Y and N,
respectively.
9 Allows only digits in character data. Allows digits and signs in numeric
data.
# Allows digits, blanks and signs.
! Converts lower-case letters to upper-case letters.
$ Displays the current currency symbol specified by SET CURRENCY. By
default, the symbol is placed immediately before or after the field.
However, the currency symbol and its placement (SET CURRENCY), the separator
character (SET SEPARATOR) and the decimal character (SET POINT) can all be
changed. Can only be used in @ ... GET when SET CURRENCY is LEFT.
* Asterisks are displayed in front of a numeric value. Use with a dollar
sign $ for check protection.
.. A decimal point specifies the decimal point position.
, A comma is used to separate digits to the left of the decimal point.
FONT <expC3>[, <expN1>]
The character expression <expC3> is the name of the font and the numeric
expression <expN1> is the font size.
For example, this short program example displays the CONTACT field for
editing. In FoxPro for Windows the text in the editing region is displayed
in 16 point Roman font:
CLOSE DATABASES
USE customer
DO CASE
CASE _WINDOWS
@ 2, 2 GET contact FONT 'ROMAN',16
CASE _DOS
@ 2, 2 GET contact
ENDCASE
READ
If you include the FONT clause but omit the font size <expN1>, a 10 point
font is used.
If the FONT clause is omitted and the editing region is placed in the main
FoxPro window, the main FoxPro window font is used. If the FONT clause is
omitted and the editing region is placed in a user-defined window, the
user-defined window font is used.
If the font you specify is not available, Windows substitutes a font with
font characteristics similar to the requested font.
The FONT clause is ignored in FoxPro for MS-DOS.
STYLE <expC4>
In FoxPro for Windows, include the STYLE clause to specify a font style for
an @ ... GET editing region. The styles that are available for a font are
determined by Windows. If the font style you specify is not available,
Windows substitutes a font style with similar characteristics.
The font style is specified with <expC4>. If the STYLE clause is omitted,
the standard font style is used.
Character Font Style
B Bold
I Italic
N Normal
O Outline
Q Opaque
S Shadow
- Strikeout
T Transparent
U Underline
If you include T to create a transparent editing region, the background
color is ignored by the region.
You can include more than one character to specify a combination of font
styles. For example, the following short program create an @ ... GET text
editing region. The CONTACT field appears in the editing region in Bold
Italic in FoxPro for Windows.
CLOSE DATABASES
CLEAR
USE customer
DO CASE
CASE _WINDOWS
@ 2, 2 GET contact STYLE 'BI'
CASE _DOS
@ 2, 2 GET contact
ENDCASE
READ
The STYLE clause is ignored in FoxPro for MS-DOS.
DEFAULT <expr1>
If you specify a memory variable for the @ ... GET editing region that
doesn't exist, it is automatically created and initialized if you include
DEFAULT. However, an array element isn't created if you specify an array
element in a DEFAULT clause. The DEFAULT clause is ignored if the memory
variable already exists or you specify a field.
Caution If the DEFAULT clause isn't included and the memory variable
<memvar> doesn't exist, the error message "Variable not found" is displayed.
The DEFAULT expression <expr1> determines the type of memory variable
created and its initial value.
ENABLE | DISABLE
Including DISABLE prevents access to an @ ... GET editing region. The
editing region is displayed in the disabled colors and cannot be selected.
By default, @ ... GET editing regions are enabled. You can include ENABLE
as a reminder in a program that a GET editing region can be accessed.
Tip If all the GETs in user-defined window are disabled, the window won't
remain on top. If all the GETs in the current READ are disabled, the READ
is terminated.
MESSAGE <expC5>
The MESSAGE clause character expression <expC5> is displayed when the @ ...
GET editing region is selected. In FoxPro for MS-DOS the message is
centered on the last line of the desktop and temporarily cancels any SET
MESSAGE expression.
In FoxPro for Windows, the message is placed in the Windows-style status
bar. If the Windows-style status bar has been turned off with SET STATUS
BAR OFF, the message is placed on the last line of the main FoxPro window.
[OPEN] WINDOW <window name>
Include the WINDOW clause to edit a memo field in a user-defined window.
The user-defined window must first be created with DEFINE WINDOW. The word
Memo is displayed when you issue @ ... GET WINDOW.
To open the memo editing window, double-click Memo or place the cursor on
the word Memo and press Ctrl+Home, Ctrl+PgUp or Ctrl+PgDn.
If OPEN is included, the memo editing window is automatically opened when
READ or READ CYCLE is issued.
To exit the window and save your editing changes in FoxPro for MS-DOS, click
the window's close box (if available) or press Ctrl+W. Press Escape to
discard your changes.
To exit the window and save your editing changes in FoxPro for Windows,
choose Close from the window's Control menu (if available) or press Ctrl+W.
Press Escape to discard your changes.
Tip A better method for editing memo fields is using @ ... EDIT instead of
@ ... GET. @ ... EDIT creates a text editing window with a scroll bar, and
the contents of the memo field are displayed when @ ... EDIT is issued.
RANGE [<expr2>] [, <expr3>]
Use the RANGE clause with character, date and numeric data to specify a
range of acceptable values. If the value you enter in the @ ... GET
editing region isn't within the specified range, a message showing the
correct range is displayed. To override the default range message, use ON
READERROR.
The lower boundary of the range is specified with <expr2>, the upper
boundary with <expr3>. <expr2> and <expr3> must be character, numeric or
date expressions that correspond to the data in the memory variable, array
element or field. Either <expr2> or <expr3> can be omitted, but not both.
If one boundary is omitted, the data you enter is checked against the
specified boundary only.
Caution The range isn't checked if you press Enter without changing the
memory variable, array element or field.
SIZE <expN2>, <expN3>
SIZE lets you control the length and height of an @ ... GET text editing
region. By default, a text editing region is one row high. The size of the
region is determined by the length of the memory variable, array element or
field or a PICTURE clause.
The height of the text editing region in rows is specified with <expN2> and
the width in columns is specified with <expN3>.
In FoxPro for Windows, the editing region font determines the size of the
editing region. The editing region font is specified with the FONT clause.
If the FONT clause is omitted, the editing region uses the font of its
parent window (the main FoxPro window or a user-defined window).
VALID <expL1> | <expN4>
Use VALID to validate input. When you attempt to exit the GET editing
region, the VALID expression is evaluated.
A VALID clause greatly simplifies data validation when used with a
user-defined function (UDF). If a UDF is called within a VALID clause in @
.... GET, the UDF should return a logical or numeric value.
Caution Unlike the RANGE clause, a VALID clause is always executed when
you exit the GET editing region unless you press Escape. The RANGE clause
is only executed when a change is made to the memory variable, array element
or a field.
<expL1>
If <expL1> evaluates to a logical true (.T.), the input is considered
correct and the editing region is exited.
If <expL1> evaluates to false (.F.), the value you entered is considered
incorrect and a message is displayed directing you to reenter the data after
pressing the Spacebar.
If a UDF validation routine performs a replacement on a field and the
validation routine then returns false, the field replacement occurs but the
previous field value is restored when you return from the UDF to the GET
editing region.
<expN4>
A VALID clause that includes a numeric expression is used to specify which
object is activated after you exit the GET editing region. Objects are @
.... GET input fields, check boxes, lists, popups, spinners, text editing
regions and each individual button in a set of push, radio and invisible
buttons. The numeric expression <expN4> has one of the three effects:
When <expN4> is 0, the cursor remains in the GET editing region. The
MESSAGE <expC5> and ERROR <expC6> error messages are suppressed. A special
error message routine can be written as part of a UDF called by VALID.
If a UDF validation routine performs a replacement on a field and the
validation routine returns 0, the field replacement occurs but the previous
field value is restored when you return to the GET editing region.
When <expN4> is positive, <expN4> specifies the number of objects to
advance. For example, when the cursor is positioned on a GET editing region
and VALID returns 1, the next object is activated. If <expN4> is greater
than the number of remaining objects, the READ is terminated (unless READ
CYCLE is issued to activate the objects).
When <expN4> is negative, <expN4> specifies the number of objects to move
back. For example, when the cursor is positioned on a GET editing region
and VALID returns -1, the previous object is activated. If <expN4> moves
back past the first object, the READ is terminated (unless READ CYCLE is
issued to activate the objects).
ERROR <expC6>
ERROR <expC6> lets you specify a custom error message displayed when a VALID
clause evaluates to false (.F.). FoxPro displays <expC6> in place of the
default error message.
WHEN <expL2>
WHEN allows or prohibits access to a GET editing region based on the value
of <expL2>, which must be true (.T.) before the GET editing region can be
accessed. If WHEN is specified and <expL2> is false (.F.), the GET editing
region cannot be accessed and the next object is activated.
COLOR SCHEME <expN5> | COLOR <color pair list>
If you do not include a COLOR clause, the colors of an @ ... GET editing
region are determined by the color scheme for the desktop or the main FoxPro
window; if an @ ... GET editing region is placed in a user-defined window,
the window's color scheme determines the editing region's colors.
Only the second color pair in a color scheme or color pair list affects the
color of an @ ... GET editing region.
The color of an @ ... GET editing region can be specified by including the
number of an existing color scheme in the COLOR SCHEME clause or a set of
color pairs in the COLOR clause.
A color scheme is a set of 10 predefined color pairs. The color pairs in a
color scheme can be changed with SET COLOR OF SCHEME. In FoxPro for MS-DOS
the color pairs in a color scheme can also be changed in the Color Picker.
A color pair is a set of two letters separated by a forward slash. The
first color letter specifies the foreground color and the second letter
specifies the background color.
For example, this color pair specifies a red foreground on a white
background:
R/W
For a list of colors and their corresponding color letters, see SET COLOR
Commands Overview or Color Table by Color Pair.
A color pair can also be specified with a set of 6 RGB (Red Green Blue)
color values separated by commas. The first 3 color values specify the
foreground color and the second 3 color values specify the background color.
The color values can range from 0 through 255.
The R/W color pair in the example above can also be specified with this RGB
color pair:
RGB(255,0,0,255,255,255)
Only color pairs 2, 5, 6 and 10 in a color scheme or color pair list affect
the @ ... GET editing region colors.
Color Pair Number Editing Region Attribute
2 @ ... GET editing region
5 Message
6 Selected @ ... GET editing region
10 Disabled @ ... GET editing region
"jdc" <jdc@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:59AB0CD9-2D30-4753-B3D2-5CD3CAA0C2E1@xxxxxxxxxxxxxxxx
>I need the @ get command syntax for a list.
>
> @ get x,y get func " <what goes here> List item 1; list item 2; list
> item 3"
>
>
> Please help. No help module and no command reference at any local book
> store.
.
- Prev by Date: Re: "File is in use" - but I have a record lock!
- Next by Date: Re: Anyone with a command reference...
- Previous by thread: Print Business Cards as Labels
- Next by thread: Re: Anyone with a command reference...
- Index(es):