Aspose::Cells::Drawing::Texts::TextBoxOptions class
Contents
[
Hide
]TextBoxOptions class
Represents the text options of the shape.
class TextBoxOptions
Methods
Method | Description |
---|---|
GetAllowTextToOverflow() | Whether allow text to overflow shape. |
GetBottomMarginPt() | Returns the bottom margin in unit of Points. |
GetLeftMarginPt() | Gets and sets the left margin in unit of Points. |
GetResizeToFitText() | Indicates whether to resize the shape to fit the text. |
GetRightMarginPt() | Gets and sets the right margin in unit of Points. |
GetShapeTextDirection() | 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. |
GetShapeTextVerticalAlignment() | It corresponds to “Format Shape - Text Options - Text Box - Vertical Alignment” in Excel. |
GetTopMarginPt() | Gets and sets the top margin in unit of Points. |
GetWrapTextInShape() | Specifies text wrapping within a shape. False - No wrapping will occur on text body. True - Wrapping will occur on text body. |
IsNull() const | Checks whether the implementation object is nullptr. |
explicit operator bool() const | operator bool() |
operator=(const TextBoxOptions& src) | operator= |
SetAllowTextToOverflow(bool value) | Whether allow text to overflow shape. |
SetBottomMarginPt(double value) | Returns the bottom margin in unit of Points. |
SetLeftMarginPt(double value) | Gets and sets the left margin in unit of Points. |
SetResizeToFitText(bool value) | Indicates whether to resize the shape to fit the text. |
SetRightMarginPt(double value) | Gets and sets the right margin in unit of Points. |
SetShapeTextDirection(TextVerticalType value) | 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. |
SetShapeTextVerticalAlignment(ShapeTextVerticalAlignmentType value) | It corresponds to “Format Shape - Text Options - Text Box - Vertical Alignment” in Excel. |
SetTopMarginPt(double value) | Gets and sets the top margin in unit of Points. |
SetWrapTextInShape(bool value) | Specifies text wrapping within a shape. False - No wrapping will occur on text body. True - Wrapping will occur on text body. |
TextBoxOptions(TextBoxOptions_Impl* impl) | Constructs from an implementation object. |
TextBoxOptions(const TextBoxOptions& src) | Copy constructor. |
~TextBoxOptions() | Destructor. |
Fields
Field | Description |
---|---|
_impl | The implementation object. |
Examples
Aspose::Cells::Startup();
//Instantiating a Workbook object
Workbook workbook;
int index = workbook.GetWorksheets().Get(0).GetTextBoxes().Add(0, 0, 350, 350);
Shape shape = workbook.GetWorksheets().Get(0).GetTextBoxes().Get(index);
shape.SetText(u"This is test.");
//Save the excel file.
workbook.Save("exmaple.xlsx");
Aspose::Cells::Cleanup();
See Also
- Namespace Aspose::Cells::Drawing::Texts
- Library Aspose.Cells for C++