TextBoxOptions

TextBoxOptions class

Represents the text options of the shape

class TextBoxOptions;

Properties

PropertyTypeDescription
shapeTextVerticalAlignmentShapeTextVerticalAlignmentTypeIt corresponds to “Format Shape - Text Options - Text Box - Vertical Alignment” in Excel.
resizeToFitTextbooleanIndicates whether to resize the shape to fit the text
shapeTextDirectionTextVerticalTypeGets or sets the text display direction within a given text body. It corresponds to “Format Shape - Text Options - Text Box - Text direction” in Excel
leftMarginPtnumberGets and sets the left margin in unit of Points.
rightMarginPtnumberGets and sets the right margin in unit of Points.
topMarginPtnumberGets and sets the top margin in unit of Points.
bottomMarginPtnumberReturns the bottom margin in unit of Points
allowTextToOverflowbooleanWhether allow text to overflow shape.
wrapTextInShapebooleanSpecifies text wrapping within a shape. False - No wrapping will occur on text body. True - Wrapping will occur on text body.

shapeTextVerticalAlignment

It corresponds to “Format Shape - Text Options - Text Box - Vertical Alignment” in Excel.

shapeTextVerticalAlignment : ShapeTextVerticalAlignmentType;

resizeToFitText

Indicates whether to resize the shape to fit the text

resizeToFitText : boolean;

shapeTextDirection

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

shapeTextDirection : TextVerticalType;

leftMarginPt

Gets and sets the left margin in unit of Points.

leftMarginPt : number;

rightMarginPt

Gets and sets the right margin in unit of Points.

rightMarginPt : number;

topMarginPt

Gets and sets the top margin in unit of Points.

topMarginPt : number;

bottomMarginPt

Returns the bottom margin in unit of Points

bottomMarginPt : number;

allowTextToOverflow

Whether allow text to overflow shape.

allowTextToOverflow : boolean;

wrapTextInShape

Specifies text wrapping within a shape. False - No wrapping will occur on text body. True - Wrapping will occur on text body.

wrapTextInShape : boolean;