home *** CD-ROM | disk | FTP | other *** search
-
-
- twBRBrowse() Column Definitions
-
-
- Each element in the column array passed to
- twBRBrowse() MUST have at least TWO
- elements. One is for the column header and
- the other for the block used to display
- the data. Six other elements are possible,
- but are not necessary. One is the column
- width and the others define and modify the
- get system in the browse.
-
- The following is the array structure used
- to pass columns to the browse:
-
- Column Structure to Pass in aColumns
-
- AADD( aColumns, { cHead, bBlk, nWid, cFoot, ;
- lEdit, cPic, bWhn, bVld, ;
- bRdr, aClr, bClr, cCsep, ;
- cHsep, cFsep })
-
- Where: 1 - cHead - Browse Column Header
- 2 - bBlk - Browse Column Block for Data
- 3 - nWid - Optional Column Width
- 4 - cFoot - Browse Column Footer
- 5 - lEdit - Optional Logical to Allow Edits
- 6 - cPic - Optional Picture for Gets
- 7 - bWhn - Optional When Block for Gets
- 8 - bVld - Optional Valid Block for Gets
- 9 - bRdr - Optional Reader Block for Gets
- 10 - aClr - Browse Column Defcolor
- 11 - bClr - Browse Column Colorblock
- 12 - cCsep - Browse Column Separator to left
- 13 - cHsep - Browse Column Head Separator
- 14 - cFsep - Browse Column Foot Separator
-
-
- The block defintion should take the form
- of a get-set block to allow the database
- field to be updated, IF you allow editing.
- Such a block is of the form:
-
- {|x| IIF( x == NIL, cField, cField := x ) }
-
- NOTE: If you are allowing direct edits on
- the database in a network situation, the
- column block MUST include the necessary
- record locking checks to allow updating,
- eg.,
-
- {|x| IIF( x == NIL, cField, ;
- IIF( yLock( n ), cField := x, ;
- dbUnlock() ), .F. )}
-
- The Get Reader may be configured to allow
- cursor movements after editing columns or
- to keep the cursor out of columns.
-
- NOTE: The get system will operate only if
- the lEditFlag is set to true in the
- function call. If it is, individual
- columns may be excluded from editing by
- setting the fourth element, lEdit in the
- column definition to False.
-
- NOTE: If you use the append mode, all
- False column definitions of lEdit become
- True. Therefore, if appends are allowed,
- pictures, whens, valids and readers may
- have to be assigned to columns which are
- normally NOT editable. They will be
- editable during appends.
-
- NOTE: Append should be allowed only if
- there is no scope imposed on the database
- with cTopKey and bScopeBlock.
-
- It is recommended that the edit, and
- especially the append mode be reserved for
- 'down and dirty' situations. The use of
- ActionKeys will allow you to process
- database edits and appends much more
- satisfactorily.
-
-
-