[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.ITextRange

Interface ITextRange

Namespace
GrapeCity.Documents.Excel.Drawing
Assembly
GcDocs.Excel.dll

Represents the text frame in the IShape.

public interface ITextRange : IEnumerable
Inherited Members
System.Collections.IEnumerable.GetEnumerator()

Properties

Count

Returns the number of objects in the collection (read-only).

int Count { get; }

Property Value

int

Font

Returns the IFontFormat object that represents character formatting for the IFontFormat object (read-only).

IFontFormat Font { get; }

Property Value

IFontFormat

Index

Returns the index in the collection (read-only).

int Index { get; }

Property Value

int

this[int]

Gets the ITextRange with the specified index.

ITextRange this[int index] { get; }

Parameters

index int

The index.ITextRange

Property Value

ITextRange

Paragraphs

Get the paragraphs of ITextRange

ITextRange Paragraphs { get; }

Property Value

ITextRange

Remarks

This property is only used in TextRangeType.Body; otherwise, it throws InvalidOperateExecption.

Runs

Get the runs of ITextRange

ITextRange Runs { get; }

Property Value

ITextRange

Remarks

This property is only used in TextRangeType.Paragraph; otherwise, it throws InvalidOperateExecption.

Text

Gets or sets a String value that represents the text in a text range (read/write).

string Text { get; set; }

Property Value

string

TextAlignment

Gets or sets the horizontal alignment of the text.

TextAlignmentAnchor TextAlignment { get; set; }

Property Value

TextAlignmentAnchor

Type

Returns the type of ITextRange, such as TextRangeType.Body, TextRangeType.Paragrapsh, or TextRangeType.Run.

TextRangeType Type { get; }

Property Value

TextRangeType

Methods

Add(string, int)

Adds text to the specified collection.

ITextRange Add(string newText = "", int position = -1)

Parameters

newText string

The new text.

position int

The position that you want to insert.

Returns

ITextRange

The new ITextRange.

Remarks

This property is only used in TextRangeType.Body and TextRangeType.Paragraph. Use this property on ITextRange.Body and it will add a paragraph with a run. Use this property on ITextRange.Paragraph and it will add a run.

Delete()

Deletes from parent.

void Delete()