TXTextControl.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

Constructor Description
TextFrame Initializes a new instance of the TextFrame class.

Properties

Property Description
Alignment Gets or sets the frame's horizontal alignment when it is anchored to a paragraph. (Inherited from FrameBase.)
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.
BackColor Gets or sets the background color of a text frame.
Barcodes Gets a collection of all barcodes contained in a text frame.
BorderWidth Gets or sets the width, in twips, of a text frame's border line.
Charts Gets a collection of all charts contained in a text frame.
DocumentLinks Gets a collection of all links in a text frame which point to targets in the same document.
DocumentTargets Gets a collection of all targets in a text frame.
Drawings Gets a collection of all drawings contained in a text frame.
Frames Gets a collection of all images, textframes, charts, barcodes and drawings in a text frame.
HypertextLinks Gets a collection of all hypertext links in a text frame.
ID Gets or sets an identifier for the frame. (Inherited from FrameBase.)
Images Gets a collection of all images contained in a text frame.
InsertionMode (Only for compatibility) Gets or sets a value determining whether a text frame is treated as a single character or the document's text either flows around or overwrites the text frame.
InsertionMode Gets or sets a value determining whether the frame is treated as a single character or the document's text either flows around or overwrites the frame. (Inherited from FrameBase.)
InternalMargins Gets or sets the distances, in twips, between the text frame's border line and the text.
Lines Gets a collection of all text lines contained in a text frame.
Location Gets or sets, in twips, the frame's current location. (Inherited from FrameBase.)
MisspelledWords Gets a collection of all misspelled words the text frame contains.
Moveable Determines whether a frame can be moved in the document at run time with the built-in mouse interface. (Inherited from FrameBase.)
Name Gets or sets a name for the frame. (Inherited from FrameBase.)
Paragraphs Gets a collection of all paragraphs contained in a text frame.
Selection Gets or sets the current selection in a text frame.
Size Gets or sets the frame's size in twips. (Inherited from FrameBase.)
Sizeable Determines whether the frame can be resized at run time with the built-in mouse interface. (Inherited from FrameBase.)
SubTextParts Gets a collection of all subtextparts in a text frame.
Tables Gets a collection of all tables in a text frame.
TextChars Gets a collection of all characters contained in a text frame.
TextDistances Gets or sets the distances, in twips, between the frame and the document's text. (Inherited from FrameBase.)
TextFields Gets a collection of all standard text fields in a text frame.
TextPosition Read only. Gets the frame's character position in the document's text (one-based). (Inherited from FrameBase.)
Transparency Gets or sets the text frame's transparency.

Methods

Method Description
Activate Activates the text frame.
ChangeZOrder Changes the frame's z-order. (Inherited from FrameBase.)
Find Finds a text string in a text frame.
GetTextFields Returns a collection containing text fields of the specified types.

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