Applies to
Declaration
void ASetCellProp(int HeaderRows, bool OddRows, bool EvenRows, int FooterRows, int FromColumn, int ToColumn, int WPAT_Code, int Value, int Mode);
Description
Applies a certain attribute to either header, footer or body rows. For table body rows you can select if odd and/or even rows should be changed.
The value of HeaderRows or FooterRows must be the negative to leave this rows unchanged!
It is possible to only set a range (1...n ) of columns or a complete rows with both FromColumn and TopColumn = 0.
The parameter Mode changes the way the attribute is applied:
-3 : clear all character attributes (from the text!)
-2 : clear all paragraph attributes
-1 : remove the given attribute
0 : set the attribute
1 : OR the attribute with the value
2 : AND NOT the attribute with the value
3 : Increase the value of the attribute by the given amount
4 : Set the row number as text
5 : Set the row number as literal A..Z as text
6 : Merges with previous row. (Not in first cell of the selected from-to range!)
Example:
// Odd rows should be green
TextCursor.ASetCellProp( -1, true, false, -1, 0, 0, (int)WPAT.FGColor, 2, 0);
// Even rows should be red
TextCursor.ASetCellProp( -1, false, true, -1, 0, 0, (int)WPAT.FGColor, 1, 0);
// Header and footer should be blue
TextCursor.ASetCellProp( 1, false, false, 1, 0, 0, (int)WPAT.FGColor, 3, 0);
// First column should be black
TextCursor.ASetCellProp( -1, true, true, -1, 1, 1, (int)WPAT.FGColor, 15, 0);
