HighlightMode Property
- 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
Gets or sets a value indicating when the subtextpart is highlighted.
Syntax
public HighlightMode HighlightMode { get; set; }Public Property HighlightMode As HighlightModeMembers
| Value | Description |
|---|---|
| Auto | This value is not used for subtextparts. |
| Activated | The subtextpart is only highlighted, when it contains the current text input position and when the control has the input focus. |
| Always | The subtextpart is always highlighted. |
| Never | The subtextpart is never highlighted. |
Examples
The following example marks the selected customer name as a named document region by using SubTextPart.HighlightMode.
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
SubTextPart subTextPart = new("CustomerName", 10);
textControl.SubTextParts.Add(subTextPart);
subTextPart.HighlightMode = HighlightMode.Never;
Console.WriteLine($"Highlight Mode used by Sub Text Part: {subTextPart.HighlightMode}");textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim subTextPart As New SubTextPart("CustomerName", 10)
textControl.SubTextParts.Add(subTextPart)
subTextPart.HighlightMode = HighlightMode.Never
Console.WriteLine($"Highlight Mode used by Sub Text Part: {subTextPart.HighlightMode}")