Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

K_SCROLL( cParent_dbf, xcRelate_key, cChild_dbf ;
          [, lFall_out[, aFields[, aPictures ;
          [, aHeads[, aEd_permits[, cHeadliner ;
          [, nTr[, nTc[, nBr[, nBc[, xcUdf_kbrow ;
          [, xcUdf_except[, xcUdf_xedit ;
          [, nColour ]]]]]]]]]]]]]] )

Purpose

Create and maintain a DBEDIT() child window (i.e. view locked on the
records related to the current parent record).

Arguments

     cParent_dbf -- the alias of the parent file

     xcRelate_key -- the relational key expression into the child file

     cChild_dbf -- the alias of the child file

     lFall_out -- if passed and .T., return after display; defaults to
                      allowing browse.

     aFields -- array of names of fields in the child table to display;
                    defaults to first 10 fields.

     aPictures -- if passed, picture strings for SAY/GETs; defaults to
                      a call to APICS() for the aFields array.

     aHeads -- if passed, headers for the columns; defaults to a call
                   to AHEADS() for the aFields array

     aEd_permits -- if passed, array of logicals parallel to
                        aFields indication if each field can be edited;
                        defaults to .T. all fields (ie. all fields
                        editable)

     cHeadliner -- if passed, window header; defaults to the alias of
                       the child table

     nTr...nBc -- coordinates of window; defaults to a dynamically
                      sized window based on the current cursor row and the
                      number of child records in the view

     xcUdf_kbrow -- if passed, the inner udf; defaults to KSCR_UDF

     udf_except -- if passed, the exception handler for xcUdf_kbrow;
                       defaults to KEXCEPT()

     xcUdf_xedit -- if passed, the udf to handle field editing;
                        defaults to K_XEDIT().

     nColour -- if passed, window color; defaults to 1

Setup

Parent and child tables must be open and indexed, ready for use. The child
table must be indexed on the key expression. Only the first three
parameters are mandatory. To invoke defaults while passing parameters
further down the line, pass .F. or NIL for the intervening parameters.

If either table is not open or indexed incorrectly, or the relational
expression does not resolve, the program will crash.

Example

CUSTOMER and ORDERS are open, related on the field Account_no, with
customer selected. To create a read/write Orders window locked on orders
for the selected customer:

     K_SCROLL( "CUSTOMER", "ACCOUNT_NO", "ORDERS", ;
               , , , , , 12 )

To paint a child window and immediately return control to the caller,
pass .T. for lFall_out.

Returns

0 if lfall_out, else 1.

Side Effects

If either file is not open or not indexed, or the relational expression is
unsound, the program will crash. To pass parameters further down the line,
pass .F. for the intervening parameters.

Artful Calls

SET_ORDER, APICS, AHEADS, IS_CHAR, MACROBLOCK, GET/SET_KEYS, DBEDIT_BOX,
MACRO, READ_MEMO, READ_IT, STAT_LINE

Source File

AA_KSCRL.PRG

See Also: TBROWSER()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson