Hi,
I could not able to set Text Box back color.Could you pls help?
myTextFrame.Paragraphs[0].Portions[0].FontColor = System.Drawing.Color.Yellow;
myTextFrame.FillFormat.BackColor = System.Drawing.Color.Yellow;
Both these code not working. But i can able to set text value like this to my ppt Text box
myTextFrame.Paragraphs[0].Portions[0].Text = "test";
Thanks,
Deepu
Hi Deepu,
Thanks for your interest in Aspose.Slides.
Please use the following code snippet to set text box color.
//Open the presentation
Presentation pres = new Presentation(“d:\pptx\Presentation.ppt”);
//Access the first slide
Slide slide = pres.GetSlideByPosition(1);
//Access the third shape
Shape shp = slide.Shapes[0];
//Change its text’s font to Verdana and height to 32
TextFrame tf = shp.TextFrame;
Paragraph para = tf.Paragraphs[0];
Portion port = para.Portions[0];
port.FontHeight = 32;
//Change text color
port.FontColor = Color.White;
//Change shape background color
shp.FillFormat.Type = FillType.Solid;
shp.FillFormat.ForeColor = Color.Blue;
//Write the output to disk
pres.Write(@“d:\pptx\outAspose.ppt”);
Hi,
This is Not working for me.. i tried like this as u said..
Could you please check.
shpe.FillFormat.Type = FillType.Solid;
shpe.FillFormat.ForeColor = Color.Yellow;
Thanks,
Deepu
Hi Deepu,
Please find the generated presentation file in attachment. I have used the both lines mentioned by you. Please use the latest version of Aspose.Slides for .NET 5.2.0.