protected
protected(textbox: JadeRichText; start: Integer; length: Integer; allowChange: Boolean io);
The protected event is generated in a JadeRichText control when a user attempts to alter in any way (for example, to insert, delete, or change the size of the font) text that is marked as protected.
Your logic can determine if changes to the rich text control should be allowed. Set the value of the allowChange parameter to true to allow the changes or to false if changes cannot be made to text in the control. The values of the start and length parameters indicate the block of text that the user is attempting to change.
If you do not implement this event on a specific control, any attempt to alter protected text is ignored.
In JADE, you can set or clear text protection only by calling the setTextProtection method. Protected text in rich text format that was created externally and loaded into a JadeRichText control remains protected.
The protected event is not raised when you call the setTextProtection method. In addition, it is not raised when you change unprotected text.
In the following example of the use of the protected event method, the user is restricted to changing a single character of protected text at a time.
jadeRichText_protected(textbox: JadeRichText input; start: Integer; length: Integer; allowChange: Boolean io) updating; begin allowChange := length < 2; end;