TXTextControl.EditableRegionInsert Method

This method inserts a new editable region in the text. The current text selection is used to define the region's start position and length. If there is no text selected, an error occurs. When the EditMode property of a Text Control has been set to Protected or Password Protected, editable regions can still be edited, either by everyone or depending on the UserName property by a certain user.

Introduced: 25.0.

Syntax

TXTextControl.EditableRegionInsert UserName [, UserId[, HighLightColor[, AlphaHighLight]]]
Parameter Description
UserName

Specifies the name of the user who can edit the region. This parameter can be an empty string to indicate, that no user name has been specified and the region can be edited by everyone.

UserId

Optional. Specifies the editable region's user identifier. It must be a one-based value. A value of zero indicates that the editable region has no identifier.

HighLightColor

Optional. Specifies the highlight color for the editable region. If this parameter is omitted, TextControl calculates an highlight color depending on the user name. Text Control uses the Microsoft Windows operating enviroment red-green-blue (RGB) color scheme. The valid range for a RGB color is 0 to &HFFFFFF. The high byte of a number in this range equals 0; the lower 3 bytes, from least to most significant byte, determine the amount of red, green, and blue, respectively. The red, green, and blue components are each represented by a number between 0 and 255 (&HFF).

AlphaHighLight

Optional. Specifies the alpha value of the highlight color. It must be a value between 0 and 255. (0: transparent, 255: opaque). The color's alpha value must be less than 255 (opaque) so that the editable region's text remains visible.

Return Value


Parameter Description
0 An error has occurred or the region could not be inserted because there is no text selected.
otherwise The regions's internal unique identifier.

Data Types

UserName:    String
UserId:    Long
HighLightColor:    Long
AlphaHighLight:    Integer
Return value:    Long

See Also