A Cell is a Rectangle containing other Elements.
Namespace: iTextSharp.textAssembly: ITextSharp (in ITextSharp.dll) Version: 4.1.6.0
Syntax
C# |
---|
public class Cell : Rectangle, ITextElementArray, IElement |
Visual Basic |
---|
Public Class Cell _ Inherits Rectangle _ Implements ITextElementArray, IElement |
Visual C++ |
---|
public ref class Cell : public Rectangle, ITextElementArray, IElement |
Remarks
A Cell is a Rectangle containing other
Elements.
A Cell must be added to a Table.
The Table will place the Cell in
a Row.
Examples

Table table = new Table(3); table.SetBorderWidth(1); table.SetBorderColor(new Color(0, 0, 255)); table.SetCellpadding(5); table.SetCellspacing(5); <strong>Cell cell = new Cell("header"); cell.SetHeader(true); cell.SetColspan(3);</strong> table.AddCell(cell); <strong>cell = new Cell("example cell with colspan 1 and rowspan 2"); cell.SetRowspan(2); cell.SetBorderColor(new Color(255, 0, 0));</strong> table.AddCell(cell); table.AddCell("1.1"); table.AddCell("2.1"); table.AddCell("1.2"); table.AddCell("2.2");
Inheritance Hierarchy
System..::..Object
iTextSharp.text..::..Element
iTextSharp.text..::..Rectangle
iTextSharp.text..::..Cell
iTextSharp.text.rtf.table..::..RtfCell
iTextSharp.text..::..Element
iTextSharp.text..::..Rectangle
iTextSharp.text..::..Cell
iTextSharp.text.rtf.table..::..RtfCell