Tbrowse example - source
* Compile: FlagShip tbr.prg -o tbr
* Run: ./tbr -or-
tbr -io=g -or- tbr -io=t
*
USE address SHARED NEW
@ 0,0 SAY "address.dbf with " + ltrim(reccount()) + " records"
if !file("addr_comp" + IndexExt()) // create index, if required
nStart := seconds()
INDEX ON upper(company) TO addr_comp
? "INDEX ON upper(company)" ; pos := col() +1
@ row(),pos SAY "= " + ltrim(seconds() - nStart) +
" seconds"
nStart := seconds()
INDEX ON idnum TO addr_id
? "INDEX ON idnum"
@ row(),pos SAY "= " + ltrim(seconds() - nStart) +
" seconds"
endif
SET INDEX TO addr_comp, addr_id
oBr := TbrowseDb(3,0, 20, 72)
for ii := 1 to Fcount()
oBr:AddColumn( TbColumnNew(FieldName(ii), FieldBlock(FieldName(ii))
))
next
oBr:Trim := .T. // optional, trim displayed data of
type 'C'
oBr:Exec() // use default
keyboard handler (source avail.)
// - or insert here your own handler
*eof*
click on the
"Back" button in your browser to return to FS5 preview.