setTextProtection

setTextProtection(start:     Integer;
                  length:    Integer;
                  protected: Boolean);

The setTextProtection method of the JadeRichText class enables you to mark a range of the content of a JadeRichText control from the position specified in the start parameter through to the length specified in the length parameter as protected or unprotected, by setting the protected parameter to true or false, respectively.

The method in the following example shows the use of the setTextProtection method.

vars
    start, length : Integer;
begin
    start := jadeRichText.selStart;
    length := jadeRichText.selLength;
    jadeRichText.setTextProtection(start, length, true);
end;