TextBoxOptions

TextBoxOptions class

Represents the text options of the shape

class TextBoxOptions;

Methods

MethodDescription
getShapeTextVerticalAlignment()It corresponds to “Format Shape - Text Options - Text Box - Vertical Alignment” in Excel.
setShapeTextVerticalAlignment(ShapeTextVerticalAlignmentType)It corresponds to “Format Shape - Text Options - Text Box - Vertical Alignment” in Excel.
getResizeToFitText()Indicates whether to resize the shape to fit the text
setResizeToFitText(boolean)Indicates whether to resize the shape to fit the text
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
setShapeTextDirection(TextVerticalType)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()Gets and sets the left margin in unit of Points.
setLeftMarginPt(number)Gets and sets the left margin in unit of Points.
getRightMarginPt()Gets and sets the right margin in unit of Points.
setRightMarginPt(number)Gets and sets the right margin in unit of Points.
getTopMarginPt()Gets and sets the top margin in unit of Points.
setTopMarginPt(number)Gets and sets the top margin in unit of Points.
getBottomMarginPt()Returns the bottom margin in unit of Points
setBottomMarginPt(number)Returns the bottom margin in unit of Points
getAllowTextToOverflow()Whether allow text to overflow shape.
setAllowTextToOverflow(boolean)Whether allow text to overflow shape.
getWrapTextInShape()Specifies text wrapping within a shape. False - No wrapping will occur on text body. True - Wrapping will occur on text body.
setWrapTextInShape(boolean)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.

getShapeTextVerticalAlignment()

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

getShapeTextVerticalAlignment() : ShapeTextVerticalAlignmentType;

Returns

ShapeTextVerticalAlignmentType

setShapeTextVerticalAlignment(ShapeTextVerticalAlignmentType)

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

setShapeTextVerticalAlignment(value: ShapeTextVerticalAlignmentType) : void;

Parameters:

ParameterTypeDescription
valueShapeTextVerticalAlignmentTypeThe value to set.

getResizeToFitText()

Indicates whether to resize the shape to fit the text

getResizeToFitText() : boolean;

setResizeToFitText(boolean)

Indicates whether to resize the shape to fit the text

setResizeToFitText(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

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

getShapeTextDirection() : TextVerticalType;

Returns

TextVerticalType

setShapeTextDirection(TextVerticalType)

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()

Gets and sets the left margin in unit of Points.

getLeftMarginPt() : number;

setLeftMarginPt(number)

Gets and sets the left margin in unit of Points.

setLeftMarginPt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getRightMarginPt()

Gets and sets the right margin in unit of Points.

getRightMarginPt() : number;

setRightMarginPt(number)

Gets and sets the right margin in unit of Points.

setRightMarginPt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getTopMarginPt()

Gets and sets the top margin in unit of Points.

getTopMarginPt() : number;

setTopMarginPt(number)

Gets and sets the top margin in unit of Points.

setTopMarginPt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getBottomMarginPt()

Returns the bottom margin in unit of Points

getBottomMarginPt() : number;

setBottomMarginPt(number)

Returns the bottom margin in unit of Points

setBottomMarginPt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getAllowTextToOverflow()

Whether allow text to overflow shape.

getAllowTextToOverflow() : boolean;

setAllowTextToOverflow(boolean)

Whether allow text to overflow shape.

setAllowTextToOverflow(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getWrapTextInShape()

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)

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;