TX Text Control .NET for Windows Forms Documentation

TextField Class

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

[C#] public class TextField
[Visual Basic] Public Class TextField

Constructors

ConstructorDescription
TextFieldInitializes a new instance of the TextField class.

Properties

PropertyDescription
BoundsGets the bounding rectangle of a text field.
DeleteableSpecifies whether a text field can be deleted by the end-user while a TX Text Control document is being edited.
DoubleClickEventSpecifies whether a TextControl.TextFieldDoubleClicked event is raised, if the end-user doubleclicks the text field.
DoubledInputPositionSpecifies whether a text field has a doubled input position in front of its first character and behind its last character.
EditableSpecifies whether the text of a text field can be changed by the end-user while a TX Text Control document is being edited.
FormattingBoundsGets the formatting rectangle of a text field.
IDGets or sets an identifier for a text field.
IsSpellCheckingEnabledSpecifies whether a text field's text is checked on misspelled words.
LengthGets the number of characters in a text field.
NameRelates a user-defined name to a text field.
ShowActivatedSpecifies whether a text field toggles its background to gray, if the current input position is in the field.
StartGets the first character position (one-based) of a text field.
TextReturns or sets the text which is contained within a text field.

Methods

MethodDescription
ScrollToSets the current input position to the beginning of a text field and scrolls it into the visible part of the document.

Example

The following example shows how to insert and populate a text field.

[C#] 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"; }
[Visual Basic] 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

See Also

 
 
 

Products

Support

Downloads

Corporate

Buy Now