TX Text Control .NET for Windows Forms Documentation

TextFrame Class

An instance of the TextFrame class represents a text frame in a Text Control document. A text frame is a rectangle that can be filled with text through an end-user and that can be edited like the main text. The TextControl class has several events that inform about different occurrences. A text frame can be added to the document through the TextFrameCollection class. The TextFrame class implements the IFormattedText interface.

Introduced: 12.0.

Syntax

[C#] public class TextFrame : FrameBase, IFormattedText
[Visual Basic] Public Class TextFrame Inherits FrameBase Implements IFormattedText

Constructors

ConstructorDescription
TextFrameInitializes a new instance of the TextFrame class.

Properties

PropertyDescription
AlignmentGets or sets the horizontal alignment of an image or text frame which is anchored to a paragraph.
ApplicationFieldsGets a collection of all Microsoft Word or Heiler HighEdit fields that have been created or imported from a Microsoft Word or RTF document.
BackColorGets or sets the background color of a text frame.
BorderWidthGets or sets the width, in twips, of a text frame's border line.
HypertextLinksGets a collection of all hypertext links in a text frame.
IDGets or sets an identifier for the image or text frame.
ImagesGets a collection of all images contained in a text frame.
InsertionModeGets or sets a value determining whether a text frame is treated as a single character or the document's text flows around the text frame.
InternalMarginsGets or sets the distances, in twips, between the text frame's border line and the text.
LinesGets a collection of all text lines contained in a text frame.
LocationGets or sets, in twips, the image's or text frame's current location.
MisspelledWordsGets a collection of all misspelled words the text frame contains.
MoveableDetermines whether an inserted image or text frame can be moved at run time.
NameGets or sets a name for the image or text frame.
ParagraphsGets a collection of all paragraphs contained in a text frame.
SelectionGets or sets the current selection in a text frame.
SizeGets or sets the current size in twips.
SizeableDetermines whether an inserted image or text frame can be resized at run time.
TablesGets a collection of all tables in a text frame.
TextCharsGets a collection of all characters contained in a text frame.
TextDistancesGets or sets the distances, in twips, between an image or text frame and the document's text.
TextFieldsGets a collection of all standard text fields in a text frame.
TextPositionRead only. Gets the image's or text frame's character position in the document's text (one-based).

Methods

MethodDescription
ActivateActivates the text frame.
FindFinds a text string in a text frame.

Example

The following example inserts a new text frame and changes the back color to blue:

[C#] TXTextControl.TextFrame myFrame = new TXTextControl.TextFrame(new Size(3000, 2000)); myFrame.BackColor = Color.Blue; textControl1.TextFrames.Add(myFrame, -1);
[Visual Basic] Dim MyFrame As New TXTextControl.TextFrame(New Size(3000, 2000)) MyFrame.BackColor = Color.Blue TextControl1.TextFrames.Add(MyFrame, -1)

See Also

 
 
 

Products

Support

Downloads

Corporate

Buy Now