Class TextBoxOptions
Contents
[
Hide
]TextBoxOptions class
Represents the text options of the shape
public class TextBoxOptions
Properties
Name | Description |
---|---|
AllowTextToOverflow { get; set; } | Whether allow text to overflow shape. |
BottomMarginPt { get; set; } | Returns the bottom margin in unit of Points |
LeftMarginPt { get; set; } | Gets and sets the left margin in unit of Points. |
ResizeToFitText { get; set; } | Indicates whether to resize the shape to fit the text |
RightMarginPt { get; set; } | Gets and sets the right margin in unit of Points. |
ShapeTextDirection { get; set; } | Gets or sets the text display direction within a given text body. It corresponds to “Format Shape - Text Options - Text Box - Text direction” in Excel |
ShapeTextVerticalAlignment { get; set; } | It corresponds to “Format Shape - Text Options - Text Box - Vertical Alignment” in Excel. |
TopMarginPt { get; set; } | Gets and sets the top margin in unit of Points. |
WrapTextInShape { get; set; } | Specifies text wrapping within a shape. False - No wrapping will occur on text body. True - Wrapping will occur on text body. |
Examples
[C#]
//Instantiating a Workbook object
Workbook workbook = new Workbook();
int index = workbook.Worksheets[0].TextBoxes.Add(0, 0, 350, 350);
Shape shape = workbook.Worksheets[0].TextBoxes[index];
shape.Text = "This is test.";
//do your business
//Save the excel file.
workbook.Save("exmaple.xlsx");
See Also
- namespace Aspose.Cells.Drawing.Texts
- assembly Aspose.Cells