XlsTextBoxShape module
- class XlsTextBoxShape.XlsTextBoxShape
Bases:
XlsShape,ITextBoxLinkShape,TextBoxShapeBaseRepresents a text box shape in an Excel worksheet.
This class provides properties and methods for manipulating text box shapes, including text content, formatting, alignment, and margins.
- property Anchor: str
Gets or sets the anchor type for the text box.
The anchor type determines how the text box is positioned relative to cells in the worksheet.
- Returns:
A string representing the anchor type.
- Return type:
str
- property BottomMarginEMU: int
Gets or sets the bottom margin of the text box in EMU (English Metric Units).
- Returns:
The bottom margin value in EMU.
- Return type:
int
- property Coordinates2007: Rectangle
Gets or sets the coordinates of the text box in Excel 2007 format.
- Returns:
A Rectangle object representing the position and size of the text box.
- Return type:
Rectangle
- property FillColor: Color
Gets or sets the fill color of the text box.
- Returns:
A Color object representing the fill color of the text box.
- Return type:
Color
- property HAlignment: CommentHAlignType
Gets or sets the horizontal alignment of text in the text box.
- Returns:
An enumeration value representing the horizontal alignment.
- Return type:
CommentHAlignType
- property HasStyleProperties: bool
Gets whether the text box has style properties.
- Returns:
True if the text box has style properties; otherwise, False.
- Return type:
bool
- property HorzOverflow: str
Gets or sets the horizontal overflow behavior for text in the text box.
This property determines how text is handled when it exceeds the horizontal bounds of the text box.
- Returns:
A string representing the horizontal overflow behavior.
- Return type:
str
- property HyLink: IHyperLink
Gets the hyperlink associated with the text box.
- Returns:
An object representing the hyperlink associated with the text box.
- Return type:
IHyperLink
- property InnerBottomMargin: float
Gets or sets the inner bottom margin of the text box in points.
- Returns:
The inner bottom margin value in points.
- Return type:
float
- property InnerLeftMargin: float
Gets or sets the inner left margin of the text box in points.
- Returns:
The inner left margin value in points.
- Return type:
float
- property InnerRightMargin: float
Gets or sets the inner right margin of the text box in points.
- Returns:
The inner right margin value in points.
- Return type:
float
- property InnerTopMargin: float
Gets or sets the inner top margin of the text box in points.
- Returns:
The inner top margin value in points.
- Return type:
float
- property InsetMode: str
Gets or sets the inset mode for the text box.
The inset mode determines how the text is positioned within the text box.
- Returns:
A string representing the inset mode.
- Return type:
str
- property IsTextLocked: bool
Gets or sets whether the text in the text box is locked.
- Returns:
True if the text is locked; otherwise, False.
- Return type:
bool
- property IsTextWrapped: bool
Gets or sets whether text is wrapped within the text box.
When text wrapping is enabled, text that exceeds the width of the text box will wrap to the next line.
- Returns:
True if text wrapping is enabled; otherwise, False.
- Return type:
bool
- property IsWrapText: bool
Gets or sets whether text wrapping is enabled in the text box.
- Returns:
True if text wrapping is enabled; otherwise, False.
- Return type:
bool
- property LeftMarginEMU: int
Gets or sets the left margin of the text box in EMU (English Metric Units).
- Returns:
The left margin value in EMU.
- Return type:
int
- property RichText: IRichTextString
Gets the rich text formatting for the text in the text box.
- Returns:
An object that represents the rich text formatting.
- Return type:
IRichTextString
- property RightMarginEMU: int
Gets or sets the right margin of the text box in EMU (English Metric Units).
- Returns:
The right margin value in EMU.
- Return type:
int
- property ShapeType: ExcelShapeType
Gets the shape type of the text box.
- Returns:
An enumeration value representing the shape type of the text box.
- Return type:
ExcelShapeType
- property Text: str
Gets or sets the text displayed in the text box.
- Returns:
The text content of the text box.
- Return type:
str
- property TextFieldId: str
Gets or sets the text field ID for the text box.
This property is used for identifying the text box in field operations.
- Returns:
The text field ID.
- Return type:
str
- property TextFieldType: str
Gets or sets the text field type for the text box.
This property defines the type of field that the text box represents.
- Returns:
The text field type.
- Return type:
str
- property TextRotation: TextRotationType
Gets or sets the text rotation in the text box.
- Returns:
An enumeration value representing the text rotation.
- Return type:
TextRotationType
- property TopMarginEMU: int
Gets or sets the top margin of the text box in EMU (English Metric Units).
- Returns:
The top margin value in EMU.
- Return type:
int
- property UpRight: int
Gets or sets whether text is displayed upright in the text box.
This property controls the orientation of text characters within the text box.
- Returns:
A value indicating the upright text setting.
- Return type:
int
- property VAlignment: CommentVAlignType
Gets or sets the vertical alignment of text in the text box.
- Returns:
An enumeration value representing the vertical alignment.
- Return type:
CommentVAlignType
- property Vert: str
Gets or sets the vertical text direction for the text box.
This property determines the direction in which text flows vertically within the text box.
- Returns:
A string representing the vertical text direction.
- Return type:
str
- property VertOverflow: str
Gets or sets the vertical overflow behavior for text in the text box.
This property determines how text is handled when it exceeds the vertical bounds of the text box.
- Returns:
A string representing the vertical overflow behavior.
- Return type:
str
