TX Text Control .NET for Windows Forms

DescriptiveText Property

Property|Introduced in 34.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets a descriptive text for a form field. An empty string indicates that the form field has no such text. An empty string can also be used to delete a previously set text.

Syntax

public string DescriptiveText { get; set; }

Examples

The following example retrieves the form field at the current input position and inspects it by using FormField.DescriptiveText.

CheckFormField field = new(false) { Name = "AcceptTerms" };
textControl.FormFields.Add(field);
FormField formField = textControl.FormFields.GetItem();

formField.DescriptiveText = "Quarterly sales by region";
if (!string.IsNullOrWhiteSpace(formField.DescriptiveText))
{
    Console.WriteLine($"Descriptive Text: {formField.DescriptiveText}");
}