We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Shape inside Table

Hello!

I would like to place a Shape (Ellipse) inside a tabel cell. Something like shown in the attached image. The ellipse should indicate a status. I know how to place a shape on a slide, but how to place it inside the cell or (if not possible) how to put it a the right position above the cell, so that the cell is empty and it just looks like the shape is inside this cell?

Thanks in advance for any idear.

Alex


Hi Alex,

Thanks for your interest in Aspose.Slides.

I regret to share with you that the requested feature is not support in Aspose.Slide for .NET.

We are sorry for your inconvenience.

Hello Tahier, hello everyone,

I’ve found a solution:

Cell cell = table.GetCell(colNum, rowNum);
int xPos = cell.TextFrame.X + cell.Width / 2;
int yPos = cell.TextFrame.Y + cell.Height / 2;

int diameter = Math.Min(cell.Height, cell.Width);
diameter -= (int)(diameter / 6.0);

Ellipse ellipse = slide.Shapes.AddEllipse(xPos - diameter/2, yPos - diameter/2, diameter, diameter);
ellipse.FillFormat.Type = FillType.Solid;
ellipse.FillFormat.ForeColor = trafficLightColor;
ellipse.LineFormat.ShowLines = false;

This places an ellipse shape above the table at the middle of the cell.

Best regards
alex

Hi Alex,

We always admire the positive feedback and
active participation from our customers. Thanks for sharing your knowledge.