TX Text Control .NET for Windows Forms Documentation

IFormattedText Interface

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.

Introduced: 16.0.

Syntax

[C#] public interface IFormattedText
[Visual Basic] Public Interface IFormattedText

Properties

PropertyDescription
ApplicationFieldsGets a collection of all Microsoft Word or Heiler HighEdit fields that have been created or imported from a Microsoft Word or RTF document.
HypertextLinksGets a collection of all hypertext links.
ImagesGets a collection of all images.
LinesGets a collection of all lines the text consists of.
MisspelledWordsGets a collection of all misspelled words.
ParagraphsGets a collection of all paragraphs the text consists of.
SelectionGets or sets the current selection.
TablesGets a collection of all tables.
TextCharsGets a collection of all characters the text consists of.
TextFieldsGets a collection of all standard text fields.

Methods

MethodDescription
FindFinds a text string.

Example

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

[C#] foreach (object obj in textControl1.TextParts) { Console.WriteLine("First Line: " + ((IFormattedText)obj).Lines[1].Text); }

See Also

 
 
 

Products

Support

Downloads

Corporate

Buy Now