"cellFillRC"

Specifies the fill pattern for a table cell.

Synopsis

setValue(string shape, "cellFillRC", int row, string column, string fillType);

getValue(string shape, "cellFillRC", int row, string column, string &fillType);

shape.cellFillRC(int row, string column, string fillType);

Parameters

Parameter Description
shape Name of the object
row The row
column The column name
fillType

The fill pattern, for example, "[pattern,[tile,gif,Image6.gif]]". more information on the fill pattern, see chapter href="Fill_Pattern_String.dita"> Fill-pattern Fill-pattern string.

Note : Note that when using an image as fill pattern, you can either use the "fit", "tile" or the "center" parameter for the fitting.

Description

Specifies the fill pattern for a table cell.

Example

In the following example, two images are used as fill pattern for table cells. You have to add rows by using the attribute "appendLine"first. In the second example, lines are used as fill pattern.

main()
{
  shape tab=getShape("TABLE1");
  dyn_string d1, d2, d3, d4;
  dyn_dyn_string vnam, nnam;
  //The entries in the Customer List, First name column
  d1=makeDynString("Peter");
  d2=makeDynString("Martin");
  d3=makeDynString("Christian");
  d4=makeDynString ("Maria");
  //Add the values to the dyn field
  vnam[1]=d1;
  vnam[2]=d2;
  vnam[3]=d3;
  vnam[4] =d4;
  //Entries of the Last name column
  d1=makeDynString("Bauer");
  d2=makeDynString("Müller");
  d3=makeDynString("Schmidt");
  d4=makeDynString("Mayer");
  //Add to the dyn dyn field
  nnam[1]=d1;
  nnam[2]=d2;
  nnam[3]=d3;
  nnam[4] =d4;
  //Ad the four values
  tab.appendLines(4, "Customer List", vnam, "Last name", nnam);
  //Fill pattern for the Table Cells
  TABLE1.cellFillRC(0,"Icon", "[pattern,[tile,gif,Icon1.png]]");
  TABLE1.cellFillRC(1,"Icon", "[pattern,[tile,gif,Icon2.png]]");
  TABLE1.cellFillRC(2,"Icon", "[pattern,[tile,gif,Icon1.png]]");
  TABLE1.cellFillRC(3,"Icon", "[pattern,[tile,gif,Icon2.png]]"); 
}
Figure 1. An Image as a Fill Pattern for a Table Cell

If you use a fill pattern such as "lines" (hatch) for a table cell, you have to set the background color by using "cellBackColRC". The lines are drawn using this color.

main()
{
  TABLE1.appendLine("Surname", "");
  TABLE1.cellBackColRC(0,"Surname", "Blue");
  TABLE1.cellFillRC(0,"Surname", "[hatch,[parallel,10,horizontal]]");
}
Figure 2. Lines as a Fill Pattern for a Table Cell

Assignment

Table