Free Support Forum -

How to add one directional arrow in table cell


I am having a table and cells into it. I need to add a horizontal arrow in one of the cells. My existing code is somewhat like this:

Table tabYes = new Table(cellYes);

tabYes.Alignment = AlignmentType.Left;

tabYes.ColumnWidths = "40% 20% 40%";

Row rowYesContent = tabYes.Rows.Add();

Cell cellYesContent = rowYesContent.Cells.Add();

cellYesContent.Alignment = AlignmentType.Left;

Text txtcellAccept1 = new Aspose.Pdf.Generator.Text("Sample Text",tf1);

Cell cellYesContent1 = rowYesContent.Cells.Add();

cellYesContent1.Alignment = AlignmentType.Left;

// Arrow needs to come here...

Cell cellYesContent2 = rowYesContent.Cells.Add();

cellYesContent2.Alignment = AlignmentType.Left;

Text txtcellAccept2 = new Aspose.Pdf.Generator.Text("Sample Text",tf1);

IS there a way to add an arrow into the cell. I tried looking for solution and got reference regarding adding a line, but npt an arrow.

Thanks in advance.


Hi Saikat,

In order to add arrow at the end of line object, please try using the following code snippet.


cellYesContent1 = rowYesContent.Cells.Add();<o:p></o:p>

cellYesContent1.Alignment = Aspose.Pdf.Generator.AlignmentType.Left;

// Arrow needs to come here...

// specify the location where graph object needs to be displayed

Graph graph1 = new Graph(sec1, 100, 400);

// specify the dimensions/positions for line

float[] posArr = new float[] { 100, 0, 300, 0 };

Line l1 = new Line(graph1, posArr);

// add arrow at the end of line

l1.GraphInfo.IsAddedArrowAtEnd = true;

// add line to shapes collection of graph