Task:
Enables the programmer to modify the coloring of individual table lines, e.g. to produce your own zebra mode (every other line).
Activation:
LlSetOption(hJob, LL_OPTION_TABLE_COLORING, LL_COLORING_PROGRAM)
In this way the control of the coloring in tables is left to your program (the corresponding setting possibilities won't appear).
LlSetOption(hJob, LL_OPTION_TABLE_COLORING,LL_COLORING_DONTCARE)
With this command, List & Label lets your program draw the background first of all, then it draws the background with the field background defined in the Designer, when required again. This allows a kind of cooperation between the programmer and the user.
Make sure to set the LL_CB_TABLELINE flag via LL_OPTION_CALLBACKMASK in order to receive this notification.
Parameters:
lParam points to an scLlTableLine structure:
_nSize: Size of the structure, sizeof(scLlTableLine)
_nType: Type of field:
Value |
Meaning |
LL_TABLE_LINE_HEADER |
Header line |
LL_TABLE_LINE_BODY |
Data line |
LL_TABLE_LINE_GROUP |
Group header |
LL_TABLE_LINE_GROUPFOOTER |
Group footer |
LL_TABLE_LINE_FILL |
Filling area when the table has a fixed size and there is some free space below the last data line |
LL_TABLE_LINE_FOOTER |
Footer line |
_hPaintDC: Device Context for the printout
_hRefDC: Device Context for references
_rcPaint: Rectangle in which the line is to be drawn. The mapping mode is in the normal drawing units, mm/10, inch/100 or inch/1000.
_nPageLine: Line index. Marks the 0-based line number on this page.
_nLine: Line index. Marks the 0-based line number of the line in the whole print.
_nLineDef: Number of line definition to be drawn.
_bZebra: TRUE, when the user chooses zebra mode in the Designer.
_rcSpacing: Cell distances
Return Value:
0
Hints:
In this callback no List & Label function may be called which will produce output (LlPrint(), etc.)!
See: Hints on the use of GDI-objects
Example:
case LL_CMND_TABLELINE:
pSCL =
(PSCLLTABLELINE)pSC->_lParam;
if ((pSCL->_nPageLine % 2)
== 1)
{
FillRect(pSCL->_hPaintDC, pSCL->_rcPaint,
GetStockObject(LTGRAY_BRUSH);
}
pscCallback->_lReply = 0;
break;