GetTextFields Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
Returns a collection containing text fields of the specified types.
Syntax
TextFieldCollection GetTextFields(TextFieldType fieldType);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 applies bold formatting through the iformatted text's selection by using IFormattedText.get_TextFields.
Selection formattedSelection = iFormattedText.Selection;
formattedSelection.Bold = true;
iFormattedText.Selection = formattedSelection;
var result = iFormattedText.GetTextFields(TextFieldType.HypertextLink);
Console.WriteLine($"Get Text Fields result: {result}");Dim formattedSelection As Selection = iFormattedText.Selection
formattedSelection.Bold = True
iFormattedText.Selection = formattedSelection
Dim result = iFormattedText.GetTextFields(TextFieldType.HypertextLink)
Console.WriteLine($"Get Text Fields result: {result}")