TextBoxOptions class
TextBoxOptions class
Represents the text options of the shape
The TextBoxOptions type exposes the following members:
Properties
Property | Description |
---|---|
shape_text_vertical_alignment | It corresponds to “Format Shape - Text Options - Text Box - Vertical Alignment” in Excel. |
resize_to_fit_text | Indicates whether to resize the shape to fit the text |
shape_text_direction | 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 |
left_margin_pt | Gets and sets the left margin in unit of Points. |
right_margin_pt | Gets and sets the right margin in unit of Points. |
top_margin_pt | Gets and sets the top margin in unit of Points. |
bottom_margin_pt | Returns the bottom margin in unit of Points |
allow_text_to_overflow | Whether allow text to overflow shape. |
wrap_text_in_shape | Specifies text wrapping within a shape. False - No wrapping will occur on text body. True - Wrapping will occur on text body. |
Example
from aspose.cells import Workbook
# Instantiating a Workbook object
workbook = Workbook()
index = workbook.worksheets[0].text_boxes.add(0, 0, 350, 350)
shape = workbook.worksheets[0].text_boxes[index]
shape.text = "This is test."
# do your business
# Save the excel file.
workbook.save("exmaple.xlsx")
See Also
- module
aspose.cells.drawing.texts