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.

Methods

MethodDescription
getShapeTextVerticalAlignment()@deprecated. Please use the ‘shapeTextVerticalAlignment’ property instead. It corresponds to “Format Shape - Text Options - Text Box - Vertical Alignment” in Excel.
setShapeTextVerticalAlignment(ShapeTextVerticalAlignmentType)@deprecated. Please use the ‘shapeTextVerticalAlignment’ property instead. It corresponds to “Format Shape - Text Options - Text Box - Vertical Alignment” in Excel.
getResizeToFitText()@deprecated. Please use the ‘resizeToFitText’ property instead. Indicates whether to resize the shape to fit the text
setResizeToFitText(boolean)@deprecated. Please use the ‘resizeToFitText’ property instead. Indicates whether to resize the shape to fit the text
getShapeTextDirection()@deprecated. Please use the ‘shapeTextDirection’ property instead. 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
setShapeTextDirection(TextVerticalType)@deprecated. Please use the ‘shapeTextDirection’ property instead. 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
getLeftMarginPt()@deprecated. Please use the ’leftMarginPt’ property instead. Gets and sets the left margin in unit of Points.
setLeftMarginPt(number)@deprecated. Please use the ’leftMarginPt’ property instead. Gets and sets the left margin in unit of Points.
getRightMarginPt()@deprecated. Please use the ‘rightMarginPt’ property instead. Gets and sets the right margin in unit of Points.
setRightMarginPt(number)@deprecated. Please use the ‘rightMarginPt’ property instead. Gets and sets the right margin in unit of Points.
getTopMarginPt()@deprecated. Please use the ’topMarginPt’ property instead. Gets and sets the top margin in unit of Points.
setTopMarginPt(number)@deprecated. Please use the ’topMarginPt’ property instead. Gets and sets the top margin in unit of Points.
getBottomMarginPt()@deprecated. Please use the ‘bottomMarginPt’ property instead. Returns the bottom margin in unit of Points
setBottomMarginPt(number)@deprecated. Please use the ‘bottomMarginPt’ property instead. Returns the bottom margin in unit of Points
getAllowTextToOverflow()@deprecated. Please use the ‘allowTextToOverflow’ property instead. Whether allow text to overflow shape.
setAllowTextToOverflow(boolean)@deprecated. Please use the ‘allowTextToOverflow’ property instead. Whether allow text to overflow shape.
getWrapTextInShape()@deprecated. Please use the ‘wrapTextInShape’ property instead. Specifies text wrapping within a shape. False - No wrapping will occur on text body. True - Wrapping will occur on text body.
setWrapTextInShape(boolean)@deprecated. Please use the ‘wrapTextInShape’ property instead. Specifies text wrapping within a shape. False - No wrapping will occur on text body. True - Wrapping will occur on text body.
isNull()Checks whether the implementation object is null.

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;

getShapeTextVerticalAlignment()

@deprecated. Please use the ‘shapeTextVerticalAlignment’ property instead. It corresponds to “Format Shape - Text Options - Text Box - Vertical Alignment” in Excel.

getShapeTextVerticalAlignment() : ShapeTextVerticalAlignmentType;

Returns

ShapeTextVerticalAlignmentType

setShapeTextVerticalAlignment(ShapeTextVerticalAlignmentType)

@deprecated. Please use the ‘shapeTextVerticalAlignment’ property instead. It corresponds to “Format Shape - Text Options - Text Box - Vertical Alignment” in Excel.

setShapeTextVerticalAlignment(value: ShapeTextVerticalAlignmentType) : void;

Parameters:

ParameterTypeDescription
valueShapeTextVerticalAlignmentTypeThe value to set.

getResizeToFitText()

@deprecated. Please use the ‘resizeToFitText’ property instead. Indicates whether to resize the shape to fit the text

getResizeToFitText() : boolean;

setResizeToFitText(boolean)

@deprecated. Please use the ‘resizeToFitText’ property instead. Indicates whether to resize the shape to fit the text

setResizeToFitText(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getShapeTextDirection()

@deprecated. Please use the ‘shapeTextDirection’ property instead. 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

getShapeTextDirection() : TextVerticalType;

Returns

TextVerticalType

setShapeTextDirection(TextVerticalType)

@deprecated. Please use the ‘shapeTextDirection’ property instead. 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

setShapeTextDirection(value: TextVerticalType) : void;

Parameters:

ParameterTypeDescription
valueTextVerticalTypeThe value to set.

getLeftMarginPt()

@deprecated. Please use the ’leftMarginPt’ property instead. Gets and sets the left margin in unit of Points.

getLeftMarginPt() : number;

setLeftMarginPt(number)

@deprecated. Please use the ’leftMarginPt’ property instead. Gets and sets the left margin in unit of Points.

setLeftMarginPt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getRightMarginPt()

@deprecated. Please use the ‘rightMarginPt’ property instead. Gets and sets the right margin in unit of Points.

getRightMarginPt() : number;

setRightMarginPt(number)

@deprecated. Please use the ‘rightMarginPt’ property instead. Gets and sets the right margin in unit of Points.

setRightMarginPt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getTopMarginPt()

@deprecated. Please use the ’topMarginPt’ property instead. Gets and sets the top margin in unit of Points.

getTopMarginPt() : number;

setTopMarginPt(number)

@deprecated. Please use the ’topMarginPt’ property instead. Gets and sets the top margin in unit of Points.

setTopMarginPt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getBottomMarginPt()

@deprecated. Please use the ‘bottomMarginPt’ property instead. Returns the bottom margin in unit of Points

getBottomMarginPt() : number;

setBottomMarginPt(number)

@deprecated. Please use the ‘bottomMarginPt’ property instead. Returns the bottom margin in unit of Points

setBottomMarginPt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getAllowTextToOverflow()

@deprecated. Please use the ‘allowTextToOverflow’ property instead. Whether allow text to overflow shape.

getAllowTextToOverflow() : boolean;

setAllowTextToOverflow(boolean)

@deprecated. Please use the ‘allowTextToOverflow’ property instead. Whether allow text to overflow shape.

setAllowTextToOverflow(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getWrapTextInShape()

@deprecated. Please use the ‘wrapTextInShape’ property instead. Specifies text wrapping within a shape. False - No wrapping will occur on text body. True - Wrapping will occur on text body.

getWrapTextInShape() : boolean;

setWrapTextInShape(boolean)

@deprecated. Please use the ‘wrapTextInShape’ property instead. Specifies text wrapping within a shape. False - No wrapping will occur on text body. True - Wrapping will occur on text body.

setWrapTextInShape(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;