Vcl.ComCtrls.TRichEdit.OnProtectChange

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnProtectChange: TRichEditProtectChange read FOnProtectChange write FOnProtectChange;

C++

__property OnProtectChange;

Properties

Type Visibility Source Unit Parent
event published
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TRichEdit

Description

Occurs when a user attempts to modify text that is marked as protected.

Vcl.ComCtrls.TRichEdit.OnProtectChange inherits from Vcl.ComCtrls.TCustomRichEdit.OnProtectChange. All content below this line refers to Vcl.ComCtrls.TCustomRichEdit.OnProtectChange.

Occurs when a user attempts to modify text that is marked as protected.

Write an OnProtectChange event handler to allow modification of text with the protected attribute. The StartPos and EndPos parameters indicate the beginning and end of the range of text that would be affected by the modification, where 0 is the first character in the text. To allow modification of protected text, set AllowChange to True.

To set or unset the protected attribute for a section of text, select the text and use the Protected property of the rich edit control's SelAttributes property. To cause text to have the protected attribute by default, use the Protected property of the rich edit object's DefAttributes property.

See Also