EditableRegion Class
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. Core. SDK
- Assembly
TXTextControl.Core. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. Core. SDK TXTextControl.from the setup.dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
An EditableRegion object represents an editable region in a TX Text Control document. When the EditMode property of a Text Control has been set to ReadAndSelect, editable regions can still be edited, either by everyone or depending on the UserName property by a certain user. Each of the main textparts of a document has an EditableRegionCollection which can be used to add and remove editable regions or to save the editable region's text.
Syntax
public class EditableRegionPublic Class EditableRegionExamples
The following example marks selected contract text as editable by the review team.
textControl.Text = "Terms subject to legal review";
textControl.Select(0, textControl.Text.Length);
EditableRegion editableRegion = new("ReviewTeam", 10);
textControl.EditableRegions.Add(editableRegion);textControl.Text = "Terms subject to legal review"
textControl.Select(0, textControl.Text.Length)
Dim editableRegion As New EditableRegion("ReviewTeam", 10)
textControl.EditableRegions.Add(editableRegion)Members
Constructors
| Constructor | Description |
|---|---|
| EditableRegion | Initializes a new instance of the EditableRegion class. |
Properties
| Property | Description |
|---|---|
| DefaultHighlightColor | Gets the default highlight color of an editable region. If the highlight color of an editable region is this default color and a user name is specified, the highlight color is set to a color depending on the user name. |
| HighlightColor | 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. |
| HighlightMode | Gets or sets a value indicating when the editable region is highlighted. |
| ID | Gets or sets the editable region's identifier. It must be a one-based value. A value of zero indicates that the editable region has no identifier. |
| Length | Gets the number of characters which belong to the editable region. |
| Number | Gets the editable region's number. The first editable region has the number 1. The number is defined through the textflow. An editable region with a smaller start position has a smaller number. |
| Start | Gets the index (one-based) of the first character which belongs to the editable region. |
| Text | Gets the editable region's text. |
| UserName | Gets or sets the name of the user who can edit the region. This parameter can be null or an empty string to indicate, that no user name has been specified and the region can be edited by everyone. |