CGXProperties::GetDataHeader
CGXData& GetDataHeader();
Return Value
A reference to the CGXData-object with the header formatting.
Remarks
Returns a reference to the CGXData-object with the header formatting.
The data-object is a table with 3 columns and 10 rows.
Column 1 contains left-aligned text, column 2 contains centered text and column 3 contains right-aligned text.
The data-object has several rows, so you can mix different fonts for the cells.
In the cells you can use predefined tokens:
- $F: File name of the document
- $A: Application name
- $P: Page number
- $N: Number of pages
- $D: Date – you can specify the date formatting with an additional parameter, as for example $D{%h:%m}
- $R: Register / Tabsheet name (if grid is used in a workbook).
Example
This example illustrates how you can specifiy the header:
   CGXData& mapDataHeader
      = GetParam()->GetProperties()->GetDataHeader();
   // Date $d will be left-aligned
   mapDataHeader.StoreStyleRowCol(2, 2, CGXStyle()
      .SetValue("$d{%x}")   // {%x} is a parameter for the
                              // default date representation.
                              // See GXIntlStrFTime for this parameter.
      , gxCopy
      );
   // Page $p will be right-aligned
   mapDataHeader.StoreStyleRowCol(1, 3, CGXStyle()
      .SetValue("Page $p")
      .SetFont(CGXFont().SetSize(10).SetBold(TRUE))
      , gxCopy
      );See Also
CGXProperties::GetDataFooter CGXProperties::OnPrintHeaderAndFooter CGXProperties::SubstTokenText






