Hi,
we are using aspose slide version 15.9. Please let me know how to set ITextFrame background color.
Thanks.
Hi,
we are using aspose slide version 15.9. Please let me know how to set ITextFrame background color.
Thanks.
Hi,
Thank you for posting.
I have observed your comments and like to share with you that a text frame is contained within a shape and background could not be set for the textframe but for the shape. I request you to please visit this documentation link for your kind reference.
I hope this will be helpful. Please share if I may help you further in this regard.
Best Regards,
Please find below my code which is not working:
ITable table = slide.Shapes.AddTable((float)PPT_GridPosition.X1, (float)PPT_GridPosition.Y1, columnWidthCollection, rowHeightCollection);
table.Slide.Shapes[1].FillFormat.FillType = FillType.Solid;
table.Slide.Shapes[1].FillFormat.SolidFillColor.Color = Color.Red;
Hi,
I have observed your comments and like to share with you that in case of a table, you need to set the color for each cell. Below code explains how the background color of a cell could be set.
Presentation Pres = new Presentation();
ISlide Sld = Pres.Slides[0];
ITable tbl = Sld.Shapes.AddTable(0, 0, new double[] { 250 }, new double[] { 50, 50, 50, 50, 50, 50 });
tbl[0, 1].TextFrame.Text = "Custom Text";
ICell cell = tbl[0, 1];
cell.FillFormat.FillType = FillType.Solid;
cell.FillFormat.SolidFillColor.Color = Color.Gray;
Pres.Save(@"D:\Test.pptx", SaveFormat.Pptx);
I hope this will be helpful. Please share if I may help you further in this regard.
Best Regards,