An instance of the TextField class represents a text field in a Text Control document. A text field is a marked piece of text that has properties like text or a name. The TextControl class has several events that inform about different occurrences. For more information see the technical article Text Fields and Hypertext Links.

Syntax

public class TextField
Public Class TextField

Examples

The following example uses the TextField class and shows how to insert and populate a text field.

TXTextControl.TextField field = new TXTextControl.TextField("Product");
field.Name = "product";
textControl1.TextFields.Add(field);

foreach (TXTextControl.TextField curfield in textControl1.TextFields)
{
    if (curfield.Name == "product")
        curfield.Text = "TX Text Control";
}
Dim field As TXTextControl.TextField = New TXTextControl.TextField("Product")
field.Name = "product"
TextControl1.TextFields.Add(field)

For Each curField As TXTextControl.TextField In TextControl1.TextFields
    If curField.Name = "product" Then
        curField.Text = "TX Text Control"
    End If
Next

Constructors

Constructor Description
TextField Creates a new instance of the TextField class.

Methods

Method Description
ScrollTo Sets the current input position to the beginning of a text field and scrolls it into the visible part of the document.

Properties

Property Description
Bounds Gets the bounding rectangle of a text field.
ContainsInputPosition Returns true, if the Textfield contains the current text input position.
Deleteable Specifies whether a text field can be deleted by the end-user while a TX Text Control document is being edited.
DoubleClickEvent Specifies whether a TextControl.TextFieldDoubleClicked event is raised, if the end-user doubleclicks the text field.
DoubledInputPosition Specifies whether a text field has a doubled input position in front of its first character and behind its last character.
Editable Specifies whether the text of a text field can be changed by the end-user while a TX Text Control document is being edited.
FormattingBounds Gets the formatting rectangle of a text field.
HighlightColor Gets or sets the highlight color for the text field.
HighlightMode Gets or sets a value indicating when the text field is highlighted.
ID Gets or sets an identifier for a text field.
IsSpellCheckingEnabled Specifies whether a text field's text is checked on misspelled words.
Length Gets the number of characters in a text field.
Name Relates a user-defined name to a text field.
ShowActivated Obsolete.
Start Gets the first character position (one-based) of a text field.
Text Returns or sets the text which is contained within a text field.