home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / t / tw21l.exe / COLHLP.DOC < prev    next >
Text File  |  1993-02-06  |  3KB  |  89 lines

  1.  
  2.  
  3.             twBRBrowse() Column Definitions
  4.  
  5.  
  6.         Each element in the column array passed to
  7.         twBRBrowse() MUST have at least TWO
  8.         elements. One is for the column header and
  9.         the other for the block used to display
  10.         the data. Six other elements are possible,
  11.         but are not necessary. One is the column
  12.         width and the others define and modify the
  13.         get system in the browse.
  14.  
  15.         The following is the array structure used
  16.         to pass columns to the browse:
  17.  
  18.         Column Structure to Pass in aColumns
  19.  
  20.        AADD( aColumns, { cHead, bBlk, nWid, cFoot, ;
  21.                          lEdit, cPic, bWhn, bVld, ;
  22.                          bRdr, aClr, bClr, cCsep, ;
  23.                          cHsep, cFsep }) 
  24.  
  25.       Where:  1 - cHead - Browse Column Header 
  26.               2 - bBlk  - Browse Column Block for Data 
  27.               3 - nWid  - Optional Column Width 
  28.               4 - cFoot - Browse Column Footer 
  29.               5 - lEdit - Optional Logical to Allow Edits 
  30.               6 - cPic  - Optional Picture for Gets 
  31.               7 - bWhn  - Optional When Block for Gets 
  32.               8 - bVld  - Optional Valid Block for Gets
  33.               9 - bRdr  - Optional Reader Block for Gets
  34.              10 - aClr  - Browse Column Defcolor
  35.              11 - bClr  - Browse Column Colorblock
  36.              12 - cCsep - Browse Column Separator to left
  37.              13 - cHsep - Browse Column Head Separator
  38.              14 - cFsep - Browse Column Foot Separator
  39.  
  40.  
  41.         The block defintion should take the form
  42.         of a get-set block  to allow the database
  43.         field to be updated, IF you allow editing.
  44.         Such a block is of the form:
  45.  
  46.         {|x| IIF( x == NIL, cField, cField := x ) }
  47.  
  48.         NOTE: If you are allowing direct edits on
  49.         the database in a network situation, the
  50.         column block MUST include the necessary
  51.         record locking checks to allow updating,
  52.         eg.,
  53.  
  54.         {|x| IIF( x == NIL, cField, ;
  55.              IIF( yLock( n ), cField := x, ;
  56.                   dbUnlock() ), .F. )}
  57.  
  58.         The Get Reader may be configured to allow
  59.         cursor movements after editing columns or
  60.         to keep the cursor out of columns.
  61.  
  62.         NOTE: The get system will operate only if
  63.         the lEditFlag is set to true in the
  64.         function call. If it is, individual
  65.         columns may be excluded from editing by
  66.         setting the fourth element, lEdit in the
  67.         column definition to False.
  68.  
  69.         NOTE: If you use the append mode, all
  70.         False  column definitions of lEdit become
  71.         True.  Therefore, if appends are allowed,
  72.         pictures, whens, valids and readers may
  73.         have to be assigned to columns which are
  74.         normally NOT editable. They will be
  75.         editable during appends.
  76.  
  77.         NOTE: Append should be allowed only if
  78.         there is no scope imposed on the database
  79.         with cTopKey and bScopeBlock.
  80.  
  81.         It is recommended that the edit, and
  82.         especially the append mode be reserved for
  83.         'down and dirty' situations. The use of
  84.         ActionKeys will allow you to process
  85.         database edits and appends much more
  86.         satisfactorily.
  87.  
  88.  
  89.