XlsButtonShape module

class XlsButtonShape.XlsButtonShape

Bases: XlsShape, IShape, ITextBox

Represents a button shape in an Excel worksheet.

This class provides properties and methods for manipulating button shapes in Excel, including text formatting, alignment, and rotation. It extends XlsShape and implements the IShape and ITextBox interfaces.

property HAlignment: CommentHAlignType

Gets or sets the horizontal alignment of the text on the button.

Returns:

An enumeration value representing the horizontal alignment.

Return type:

CommentHAlignType

property IsTextLocked: bool

Gets or sets whether the text on the button is locked.

Returns:

True if the text is locked; otherwise, False.

Return type:

bool

property RichText: IRichTextString

Gets the rich text formatting of the button text.

Returns:

An object representing the rich text formatting.

Return type:

IRichTextString

property ShapeType: ExcelShapeType

Gets the type of the shape.

Returns:

An enumeration value representing the type of the shape.

Return type:

ExcelShapeType

property Text: str

Gets or sets the text displayed on the button.

Returns:

The text displayed on the button.

Return type:

str

property TextRotation: TextRotationType

Gets or sets the rotation of the text on the button.

Returns:

An enumeration value representing the text rotation type.

Return type:

TextRotationType

property VAlignment: CommentVAlignType

Gets or sets the vertical alignment of the text on the button.

Returns:

An enumeration value representing the vertical alignment.

Return type:

CommentVAlignType