[Top]  [Chapter]  [Previous]  [Next]

Applies to



void ASetCellProp(int HeaderRows, bool OddRows, bool EvenRows, int FooterRows, int FromColumn, int ToColumn, int WPAT_Code, int Value, int Mode);


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!)





// Odd rows should be green

TextCursor.ASetCellProp( -1truefalse-100, (int)WPAT.FGColor20);

// Even rows should be red

TextCursor.ASetCellProp( -1falsetrue, -100, (int)WPAT.FGColor, 10);

// Header and footer should be blue

TextCursor.ASetCellProp( 1falsefalse100, (int)WPAT.FGColor, 30);

// First column should be black

TextCursor.ASetCellProp( -1truetrue, -11, 1, (int)WPAT.FGColor, 150);



[iwptextcursor_asetcellprop.htm]    Copyright © 2007 by WPCubed GmbH