GetTextFields Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Returns a collection containing text fields of the specified types.
Syntax
public TextFieldCollection GetTextFields(TextFieldType fieldType);Public Function GetTextFields(fieldType As TextFieldType) As TextFieldCollectionParameters
| Parameter | Description |
|---|---|
| fieldType | Specifies types of text fields. It can be a combination of the TextFieldType values. |
Return Value
The return value is a collection of all fields of the specified types.
Examples
The following example creates a header for the first section and configures its content or layout by using HeaderFooter.get_TextFields.
HeaderFooterCollection headers = textControl.Sections[1].HeadersAndFooters;
headers.Add(HeaderFooterType.Header);
HeaderFooter headerFooter = headers.GetItem(HeaderFooterType.Header);
headerFooter.Selection.Text = "Quarterly report";
var result = headerFooter.GetTextFields(TextFieldType.HypertextLink);
Console.WriteLine($"Get Text Fields result: {result}");Dim headers As HeaderFooterCollection = textControl.Sections(1).HeadersAndFooters
headers.Add(HeaderFooterType.Header)
Dim headerFooter As HeaderFooter = headers.GetItem(HeaderFooterType.Header)
headerFooter.Selection.Text = "Quarterly report"
Dim result = headerFooter.GetTextFields(TextFieldType.HypertextLink)
Console.WriteLine($"Get Text Fields result: {result}")