XTREE Footer

XTREE enhancement: You can now define a footer, which is like a mirror of the header, i.e. a line which remains fixed and is not affected by scrolling or by loading/updating of data or answer lines.

To enable and configure the display of the footer line, two new fields have been added to the bottom of the XTRCTL parameter structure, which now ends like this:

...

map2 XTR'CTLID,B,2              ! A-Shell ctl #

map2 XTR'LEFTINDEX,B,1          ! Left-most visible column

map2 XTR'SHOWFOOTER,B,1         ! Show footer

map2 XTR'FOOTERSTYLE,b,1        ! same XTHSF_xxx flags as HEADERSTYLE (6.3.1537+)

map2 UNUSED2,X,12               ! was 14

                                ! (total size = 128)

 

To enable the display of the footer, set the SHOWFOOTER field to 1. The FOOTERSTYLE field can be used to adjust the attributes of the footer, using the same options as in the HEADERSTYLE field for the headers.`

To define the display contents of each column in the footer, you can append a clause to the header field of the coldef. The footer clause must begin with a pair of colons (::) followed by a string of text which has follows the same syntax as for the header. For example, the following COLDEF excerpt defines a column starting in position 9, 12 characters wide, with "Qty" in the header and "Total Qty" in the footer...

COLDEF += "9~12~Qty::Total Qty~#EX~~"

In practice, you might want to replace the generic description "Total Qty" with the actual total for that column. To do that, you would need to sum the column in the application (initially, and/or after any changes to the column), and then the COLDEF string would have to be rebuilt with the updated footer definition, e.g.

COLDEF += "9~12~Qty::Total: "+TOT'QTY using "#####"+"#EX~~"

(The COLDEF for an existing tree can be updated by just passing the new COLDEF string in an XTROP_REPLACE or XTROP_RESELECT call.)

You may also define font, scale, and color attributes using the following new Advanced Coldef Options:

FooterFont=     (same syntax as for HeaderFont)

FooterScale=    (same syntax as for HeaderScale)

RGBbgFooter=    (same syntax as for RGBbgTotals)

RGBfgFooter=    (same syntax as for RGBfgTotals)