The automatically inserted text is inserted with
Code: Select all
TextStyle.Protection := [rvprModifyProtect,rvprConcateProtect,rvprDoNotAutoSwitch,rvprStyleProtect,rvprStyleSplitProtect];
TextStyle.Color := clGray;
TextStyle.BackColor := clbtnface;
I tried
Code: Select all
if (rvprModifyProtect in TDBRichViewEdit(ActiveControl).Style.TextStyles[TDBRichViewEdit(Mainform.ActiveControl).CurTextStyleNo].protection) then
Is there a way to check if I am in a protected or unprotected text when the text has rvprDoNotAutoSwitch in its protection?
Best regards
Bjoern