TX Text Control ActiveX

EditableRegionInsert Method

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]]]

Parameters

ParameterDescription
UserNameSpecifies 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.
UserIdOptional. 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.
HighLightColorOptional. 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 environment 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).
AlphaHighLightOptional. 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

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

Data Types

NameData type
UserNameString
UserIdLong
HighLightColorLong
AlphaHighLightInteger
Return valueLong

See Also