想請問有無為尾部空格添加底線參數
範例如下
- Code: Select all
Spire.Presentation.Presentation ppt = new Spire.Presentation.Presentation();
Spire.Presentation.ISlide slide = ppt.Slides[0];
Spire.Presentation.IAutoShape shape = slide.Shapes.AppendShape(Spire.Presentation.ShapeType.Rectangle, new RectangleF(100, 100, 400, 80));
shape.Fill.FillType = FillFormatType.None;
shape.Line.FillType = FillFormatType.None;
var para = new Spire.Presentation.TextParagraph();
string text = "(6) ";
Spire.Presentation.TextRange range = new Spire.Presentation.TextRange(text);
range.Fill.FillType = Spire.Presentation.Drawing.FillFormatType.Solid;
range.Fill.SolidColor.Color = Color.Black;
range.TextUnderlineType = Spire.Presentation.TextUnderlineType.Single;
para.TextRanges.Append(range);
shape.TextFrame.Paragraphs.Append(para);
ppt.SaveToFile("output.pptx", Spire.Presentation.FileFormat.Pptx2013);