[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.ITextFrame

ITextFrame Interface

Represents the text frame in an IShape object.

An ITextFrame provides access to the text content and layout settings of a shape, including the text range, text direction, text anchoring, and inner margins.

Namespace: GrapeCity.Documents.Excel.Drawing
Assembly: DS.Documents.Excel.dll
Syntax
public interface ITextFrame
Public Interface ITextFrame
Examples
IShape shape = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 10, 10, 120, 60);
ITextFrame textFrame = shape.TextFrame;
textFrame.TextRange.Text = "Hello";
textFrame.Direction = TextDirection.Vertical;

Properties

Name Description
Direction

Gets or sets the text direction.

Use this property to determine how text is oriented within the shape's text frame, such as horizontal, vertical, rotated, or stacked text.

HorizontalAnchor

Gets or sets the horizontal anchor for the text frame in the shape.

Use this property to determine how the text frame is anchored horizontally within the shape. To control the horizontal alignment of the text itself, use TextAlignment.

MarginBottom

Gets or sets the distance, in points, between the bottom of the text frame and the bottom edge of the inscribed rectangle of the shape that contains the text.

Use this property to determine the inner bottom margin applied to text within a shape's text frame.

MarginLeft

Gets or sets the distance, in points, between the left edge of the text frame and the left edge of the inscribed rectangle of the shape that contains the text.

Use this property to determine the inner left margin applied to text within a shape's text frame.

MarginRight

Gets or sets the distance, in points, between the right edge of the text frame and the right edge of the inscribed rectangle of the shape that contains the text.

This value controls the internal right margin for text displayed in a shape.

MarginTop

Gets or sets the distance, in points, between the top edge of the text frame and the top edge of the inscribed rectangle of the shape that contains the text.

Use this property to determine the inner top margin applied to text within a shape's text frame.

TextRange

Returns the ITextRange object that represents the text in the object.

Use the returned text range to read or modify the shape text and its formatting.

VerticalAnchor

Gets or sets the vertical anchor for the text frame in the shape.

The vertical anchor controls whether the text in the shape is aligned to the top, middle, or bottom of the text frame.