[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
sf_cua_browse Allows the browsing of a DBF file
------------------------------------------------------------------------------
* function long sf_cua_browse prototype
parameters alias dbf_alias,;
value int lr,;
value int lc,;
value int rr,;
value int rc,;
const char( 11 ) field_array[ 0 ],;
untyped header_array[ 0 ],;
value int max_fields,;
const logical display_only,;
const logical return_on_key,;
const char field_delimit,;
value int window_color,;
const char header_string,;
value int header_color,;
value int dbf_header_color,;
value long beginning_record,;
const logical use_handler,;
untyped exception_handler
Sf_browse() allows the browsing of a DBF file by only passing the
alias. The max_fields parameters refers to the number of elements
in the field_array[] and header_array[] ( which should always be
the same number ). Field_delimit is the character to place between
each field during the browse, and dbf_header_color is the color value
used for the field titles passed by header_array[]. Beginning_record
specifies the record initially displayed.
Sf_browse() allows various types of browsing. For example, you may
pass "" as the field_array[] parameter and sf_browse() will read/use
all the fields in the DBF file. Additionally, you may pass "" as the
header_array[] parameter and sf_browse() will read/use the actual
field titles as the field header string. If you pass either/both
of these arrays as "", you may apt to pass max_fields as 0 which will
allow sf_browse() to use all the fields in the DBF structure, or as
a lower number which will limit sf_browse() to that number of fields.
See the example program: BDEMO.PRG
NOTE: Since you may have an active index, giving a beginning record
of 1 may not put you to the top of the DBF file. If you pass
a -1 for beginning record, the browse will go to the top.
NOTES: Fields longer than the window will not display.
Your field_array[] elements ( if included ) must be char( 11 ).
UPDATE: The current version of SF_BROWSE() supports the following
changes:
1. Correct date format
2. Correct memo format
3. CTRL-RTARROW to jump to the last field
4. CTRL-LFARROW to jump to the first field
5. Programmer may pass .t. to use_handler and the
exception_handler procedure of their choice.
See Also:
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson