- contrib/hbct/doc/en/ct.txt
* contrib/hbct/doc/en/ctc.txt
* contrib/hbct/doc/en/strdiff.txt
* contrib/hbct/doc/en/token2.txt
* contrib/hbgt/doc/en/hbgt.txt
* contrib/hbmisc/doc/en/dates2.txt
* contrib/hbmisc/doc/en/ht_class.txt
* contrib/hbmisc/doc/en/ht_str.txt
* contrib/hbnf/doc/en/aavg.txt
* contrib/hbnf/doc/en/acctadj.txt
* contrib/hbnf/doc/en/acctmnth.txt
* contrib/hbnf/doc/en/acctqtr.txt
* contrib/hbnf/doc/en/acctweek.txt
* contrib/hbnf/doc/en/acctyear.txt
* contrib/hbnf/doc/en/adapter.txt
* contrib/hbnf/doc/en/aemaxlen.txt
* contrib/hbnf/doc/en/aeminlen.txt
* contrib/hbnf/doc/en/alt.txt
* contrib/hbnf/doc/en/amedian.txt
* contrib/hbnf/doc/en/anomatch.txt
* contrib/hbnf/doc/en/any2any.txt
* contrib/hbnf/doc/en/aredit.txt
* contrib/hbnf/doc/en/asum.txt
* contrib/hbnf/doc/en/at2.txt
* contrib/hbnf/doc/en/bitclr.txt
* contrib/hbnf/doc/en/byt2bit.txt
* contrib/hbnf/doc/en/byt2hex.txt
* contrib/hbnf/doc/en/calendar.txt
* contrib/hbnf/doc/en/chdir.txt
* contrib/hbnf/doc/en/cint86.txt
* contrib/hbnf/doc/en/clrsel.txt
* contrib/hbnf/doc/en/cntryset.txt
* contrib/hbnf/doc/en/ctrl.txt
* contrib/hbnf/doc/en/d2e.txt
* contrib/hbnf/doc/en/datecnfg.txt
* contrib/hbnf/doc/en/default.txt
* contrib/hbnf/doc/en/dosver.txt
* contrib/hbnf/doc/en/easter.txt
* contrib/hbnf/doc/en/elapmil.txt
* contrib/hbnf/doc/en/elapsed.txt
* contrib/hbnf/doc/en/eltime.txt
* contrib/hbnf/doc/en/findith.txt
* contrib/hbnf/doc/en/firstday.txt
* contrib/hbnf/doc/en/floptst.txt
* contrib/hbnf/doc/en/fttext.txt
* contrib/hbnf/doc/en/getenvrn.txt
* contrib/hbnf/doc/en/hex2dec.txt
* contrib/hbnf/doc/en/iamidle.txt
* contrib/hbnf/doc/en/idle.txt
* contrib/hbnf/doc/en/inp.txt
* contrib/hbnf/doc/en/invclr.txt
* contrib/hbnf/doc/en/isprint.txt
* contrib/hbnf/doc/en/lastday.txt
* contrib/hbnf/doc/en/linked.txt
* contrib/hbnf/doc/en/madd.txt
* contrib/hbnf/doc/en/menu1.txt
* contrib/hbnf/doc/en/menutonf.txt
* contrib/hbnf/doc/en/metaph.txt
* contrib/hbnf/doc/en/miltime.txt
* contrib/hbnf/doc/en/min2dhm.txt
* contrib/hbnf/doc/en/mkdir.txt
* contrib/hbnf/doc/en/month.txt
* contrib/hbnf/doc/en/mouse1.txt
* contrib/hbnf/doc/en/n2color.txt
* contrib/hbnf/doc/en/netpv.txt
* contrib/hbnf/doc/en/nooccur.txt
* contrib/hbnf/doc/en/ntow.txt
* contrib/hbnf/doc/en/nwlstat.txt
* contrib/hbnf/doc/en/nwsem.txt
* contrib/hbnf/doc/en/nwuid.txt
* contrib/hbnf/doc/en/origin.txt
* contrib/hbnf/doc/en/outp.txt
* contrib/hbnf/doc/en/page.txt
* contrib/hbnf/doc/en/peek.txt
* contrib/hbnf/doc/en/pickday.txt
* contrib/hbnf/doc/en/popadder.txt
* contrib/hbnf/doc/en/proper.txt
* contrib/hbnf/doc/en/putkey.txt
* contrib/hbnf/doc/en/qtr.txt
* contrib/hbnf/doc/en/rand1.txt
* contrib/hbnf/doc/en/reboot.txt
* contrib/hbnf/doc/en/rmdir.txt
* contrib/hbnf/doc/en/round.txt
* contrib/hbnf/doc/en/savearr.txt
* contrib/hbnf/doc/en/scancode.txt
* contrib/hbnf/doc/en/setdate.txt
* contrib/hbnf/doc/en/settime.txt
* contrib/hbnf/doc/en/shift.txt
* contrib/hbnf/doc/en/sinkey.txt
* contrib/hbnf/doc/en/sleep.txt
* contrib/hbnf/doc/en/sqzn.txt
* contrib/hbnf/doc/en/stod.txt
* contrib/hbnf/doc/en/sysmem.txt
* contrib/hbnf/doc/en/tbwhile.txt
* contrib/hbnf/doc/en/tempfile.txt
* contrib/hbnf/doc/en/vertmenu.txt
* contrib/hbnf/doc/en/vidcur.txt
* contrib/hbnf/doc/en/vidmode.txt
* contrib/hbnf/doc/en/wda.txt
* contrib/hbnf/doc/en/week.txt
* contrib/hbnf/doc/en/year.txt
* contrib/hbziparc/doc/en/hbziparc.txt
* contrib/rddads/doc/en/adsfuncs.txt
* contrib/rddads/doc/en/readme.txt
* doc/en/1stread.txt
* doc/en/array.txt
* doc/en/binnum.txt
* doc/en/browse.txt
* doc/en/command.txt
* doc/en/compiler.txt
* doc/en/datetime.txt
* doc/en/dbdelim.txt
* doc/en/dbsdf.txt
* doc/en/dbstrux.txt
* doc/en/dir.txt
* doc/en/diskspac.txt
* doc/en/errsys.txt
* doc/en/eval.txt
* doc/en/file.txt
* doc/en/garbage.txt
* doc/en/harbext.txt
* doc/en/hashes.txt
* doc/en/hb_set.txt
* doc/en/hbinet.txt
* doc/en/hvm.txt
* doc/en/idle.txt
* doc/en/input.txt
* doc/en/lang.txt
* doc/en/macro.txt
* doc/en/math.txt
* doc/en/memo.txt
* doc/en/memvar.txt
* doc/en/menu.txt
* doc/en/misc.txt
* doc/en/nation.txt
* doc/en/objfunc.txt
* doc/en/rdd.txt
* doc/en/rdddb.txt
* doc/en/rddmisc.txt
* doc/en/rddord.txt
* doc/en/set.txt
* doc/en/setmode.txt
* doc/en/string.txt
* doc/en/tclass.txt
* doc/en/terminal.txt
* doc/en/tgetlist.txt
* doc/en/tlabel.txt
* doc/en/treport.txt
* doc/en/var.txt
* sync with fixes/updates from 3.4 fork
86 lines
3.5 KiB
Plaintext
86 lines
3.5 KiB
Plaintext
/* $DOC$
|
|
$NAME$
|
|
ft_BrwsWhl()
|
|
$CATEGORY$
|
|
Menus/Prompts
|
|
$ONELINER$
|
|
Browse an indexed database limited to a while condition
|
|
$SYNTAX$
|
|
ft_BrwsWhl( <aFields>, <bWhileCond>, <cKey>, ;
|
|
[ <nFreeze> ], [ <lSaveScrn> ], [ <cColorList> ], ;
|
|
[ <cColorShadow> ], [ <nTop> ], [ <nLeft> ], ;
|
|
[ <nBottom> ], [ <nRight> ] -> nRecno
|
|
$ARGUMENTS$
|
|
<aFields> is array of field blocks of fields you want to display.
|
|
Example to set up last name and first name in array:
|
|
aFields := {}
|
|
AAdd( aFields, { "Last Name" , {|| Names->Last } } )
|
|
AAdd( aFields, { "First Name", {|| Names->First } } )
|
|
|
|
<bWhileCond> is the limiting WHILE condition as a block.
|
|
Example 1: {|| Names->Last == "JONES" }
|
|
Example 2: {|| Names->Last == "JONES" .AND. Names->First == "A" }
|
|
|
|
<cKey> is the key to find top condition of WHILE.
|
|
cLast := "JONES "
|
|
cFirst := "A"
|
|
Example 1: cKey := cLast
|
|
Example 2: cKey := cLast + cFirst
|
|
|
|
<nFreeze> is number of fields to freeze in TBrowse. Defaults
|
|
to 0 if not passed.
|
|
|
|
<lSaveScrn> is a logical indicating whether or not you want to
|
|
save the screen from the calling program. Defaults to .T. if
|
|
not passed.
|
|
|
|
<cColorList> is a list of colors for the TBrowse columns.
|
|
The 1st color is used as SAY/TBrowse Background and the
|
|
3rd and 4th colors are used as part of column:defColor := { 3, 4 }
|
|
|
|
Thus if you pass a cColorList, you MUST pass at least 4 colors.
|
|
Defaults to "N/W, N/BG, B/W, B/BG, B/W, B/BG, R/W, B/R" if not passed.
|
|
|
|
<cColorShad> is the color of the TBrowse box shadow. Defaults
|
|
to "N/N" if not passed.
|
|
|
|
<nTop>, <nLeft>, <nBottom>, <nRight> are the coordinates of
|
|
the area to display the TBrowse in. Defaults to 2, 2,
|
|
MaxRow() - 2, MaxCol() - 2 with shadowed box, i.e. full screen.
|
|
$RETURNS$
|
|
nRecno is the number of the record selected by the <Enter> key.
|
|
0 is returned if there are either no records matching the WHILE
|
|
condition or an <Esc> is pressed instead of an <Enter>
|
|
$DESCRIPTION$
|
|
This is a demonstration of TBrowse with a WHILE condition for an
|
|
indexed database.
|
|
$EXAMPLES$
|
|
// This example will only show those people with last name of "JONES"
|
|
// in the TBNames.dbf which contains at least the fields:
|
|
// Last, First, City AND is indexed on Last + First.
|
|
LOCAL nRecSel := 0
|
|
LOCAL aFields := {}
|
|
LOCAL bWhile := {|| TBNames->Last = "JONES" }
|
|
LOCAL cKey := "JONES"
|
|
LOCAL nFreeze := 1
|
|
LOCAL lSaveScrn := .T.
|
|
LOCAL cColorList := "N/W, N/BG, B/W, B/BG, B/W, B/BG, R/W, B/R"
|
|
LOCAL cColorShad := "N/N"
|
|
|
|
USE tbnames INDEX tbnames NEW // indexed on Last + First
|
|
|
|
// Pass Heading as character and Field as Block including Alias
|
|
// To eliminate the need to use FieldWBlock() function in ft_BrwsWhl()
|
|
AAdd( aFields, { "Last Name" , {|| TBNames->Last } } )
|
|
AAdd( aFields, { "First Name", {|| TBNames->First } } )
|
|
AAdd( aFields, { "City" , {|| TBNames->City } } )
|
|
|
|
IF ft_BrwsWhl( aFields, bWhile, cKey, nFreeze, lSaveScrn, ;
|
|
cColorList, cColorShad, 3, 6, MaxRow() - 2, MaxCol() - 6 ) == 0
|
|
? "Sorry, No records were selected"
|
|
ELSE
|
|
? "You Selected:", TBNames->Last, TBNames->First, TBNames->City
|
|
ENDIF
|
|
$END$
|
|
*/
|