[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
VEDIT() Emulates the dBASE III+ "Edit" command
Description:
VEDIT() emulates the dBASE III+ "Edit" command by allowing the user to
page back and forth through the database records.
Syntax:
VEDIT( <expL> )
Pass:
<expL> = .T. if database is indexed
.F. if database is not indexed
Return:
<expN> = INKEY() value of last key pressed by user.
Notes:
Example:
TEXTSHELL() && Display all the background stuff
DO WHILE .T.
DISPFLDS() && Display fields for current record
gn_StartRec = RECNO()
n_Value = VEDIT(.T.)
DO CASE
CASE n_Value = 13 && [Return]
EDITPROG() && Edit current record
CASE n_Value = 22 && [Insert]
ADD_PROG() && Add a new record
CASE n_Value = 27 && [Escape]
EXIT
ENDCASE
ENDDO
.
.
.
Usage:
VEDIT() is very useful for working with "flat" databases in that
VEDIT() controls all the moving aroung inside your database and will
handle SEEKs based on a pressed key, etc.
Valid keys from with VEDIT()
----------------------------
[HOME] - Move to first record
[END] - Move to last record
[PGUP] - Move to previous record
[PGDN] - Move to next record
Any AlphaNumeric character invokes a SEEK to the first recortd
beginning with the pressed key (provided the database has an open
index and <expL> is .T.).
Any other key causes VEDIT() to exit and return the INKEY() value of
the pressed key to the calling program.
It is your job as the programmer to LOOP to display the records. i.e.
VEDIT() will return a value of zero for the four keys listed above
(HOME, END, PGUP, PGDN). If your calling program receives a value of
zero from VEDIT() it should merely loop and display the current
record.
See Also:
VPICK()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson