The IFormattedText interface contains properties and methods common to all text parts in a TX Text Control document. A TX Text Control document consists of the document's main text and additional pieces of text like text frames and headers and footers. A single text part has lines, paragraphs, characters and a selection which can be used to assign character and paragraph formatting attributes to a piece of text. Additionally a text part can contain tables, images, text fields, hypertext links and misspelled words. The following classes implement this interface: TextControl, ServerTextControl, WPF.TextControl, TextFrame, HeaderFooter and MainText.

Syntax

public interface IFormattedText
Public Interface IFormattedText

Introduced: 16.0.

Examples

The following examples shows how to loop through all text parts to get the first line of each part.

foreach (object obj in textControl1.TextParts) 
{ 
       Console.WriteLine("First Line: " + ((IFormattedText)
       obj).Lines[1].Text); 
}
For Each obj As Object In textControl1.TextParts
    Console.WriteLine("First Line: " & (CType(obj, IFormattedText)).Lines(1).Text)

Next

Methods

Method Description
Find Finds a text string.
GetTextFields Returns a collection containing text fields of the specified types.

Properties

Property Description
ApplicationFields Gets a collection of all Microsoft Word or Heiler HighEdit fields that have been created or imported from a Microsoft Word or RTF document.
Barcodes Gets a collection of all barcodes.
Comments Gets a collection of all comments.
DocumentLinks Gets a collection of all links which point to targets in the same document.
DocumentTargets Gets a collection of all targets.
Drawings Gets a collection of all drawings.
EditableRegions Gets a collection of all editable regions.
FormFields Gets a collection of all form fields.
Frames Gets a collection of all images, textframes, charts, barcodes and drawings.
HypertextLinks Gets a collection of all hypertext links.
Images Gets a collection of all images.
Lines Gets a collection of all lines the text consists of.
MisspelledWords Gets a collection of all misspelled words.
Paragraphs Gets a collection of all paragraphs the text consists of.
Selection Gets or sets the current selection.
SubTextParts Gets a collection of all subtextparts.
Tables Gets a collection of all tables.
TablesOfContents Gets a collection of all tables of contents.
TextChars Gets a collection of all characters the text consists of.
TextFields Gets a collection of all standard text fields.
TrackedChanges Gets a collection of all tracked changes.