Click or drag to resize

TextSelection Class

Represent a selection of text inside paragraph.
Inheritance Hierarchy
System Object
Spire.Doc.Documents TextSelection

Namespace: Spire.Doc.Documents
Assembly: Spire.Doc (in Spire.Doc.dll) Version: 13.2.3.0 (13.2.3.3046)
Syntax
public class TextSelection : IEnumerable

The TextSelection type exposes the following members.

Constructors
Name Description
Public method TextSelection(Paragraph, Int32, Int32)
Initializes a new instance of the TextSelection class with the specified paragraph and character positions.
Public method TextSelection(Paragraph, Paragraph, Int32, Int32)
Initializes a new instance of the TextSelection class.
Top
Properties
Name Description
Public property Count
Gets the count of text chunks.
Public property Item
Gets or sets the String at the specified index.
Public property SelectedText
Gets the selected text.
Top
Methods
Name Description
Public method Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object .)
Protected method Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object .)
Public method GetAsOneRange
Gets as one range.
Public method GetAsOneRange(Boolean)
Gets as one range.
Public method GetAsRange
Gets as range.more than one paragraph, every paragraph to one text range.
Public method GetAsRange(Boolean)
Returns an array of TextRange objects representing the selected text in the RichTextBox control. If isCopyFormat is true, the format of the selected text is also copied to the clipboard.
Public method GetEnumerator
Returns an enumerator that iterates through a collection.
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object .)
Public method GetRanges
Gets the ranges in one paragraph.
Public method GetType
Gets the Type of the current instance.
(Inherited from Object .)
Protected method MemberwiseClone
Creates a shallow copy of the current Object .
(Inherited from Object .)
Public method ToString
Returns a string that represents the current object.
(Inherited from Object .)
Top
See Also