HighlightColor Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets the highlight color for the editable region. The color's alpha value must be less than 255 (opaque) so that the editable region's text remains visible. The default value is green with an alpha value of 60. If the highlight color is EditableRegion.DefaultHighlightColor and a user name is specified, the highlight color is set to a color depending on the user name.
Syntax
public Color HighlightColor { get; set; }Public Property HighlightColor As ColorExamples
The following example marks selected contract text as editable by the review team by using EditableRegion.HighlightColor.
textControl.Text = "Terms subject to legal review";
textControl.Select(0, textControl.Text.Length);
EditableRegion editableRegion = new("ReviewTeam", 10);
textControl.EditableRegions.Add(editableRegion);
editableRegion.HighlightColor = System.Drawing.Color.LightSteelBlue;
Console.WriteLine($"Highlight Color used by Editable Region: {editableRegion.HighlightColor}");textControl.Text = "Terms subject to legal review"
textControl.Select(0, textControl.Text.Length)
Dim editableRegion As New EditableRegion("ReviewTeam", 10)
textControl.EditableRegions.Add(editableRegion)
editableRegion.HighlightColor = System.Drawing.Color.LightSteelBlue
Console.WriteLine($"Highlight Color used by Editable Region: {editableRegion.HighlightColor}")