Protected Property at times not working

  • Given:

    DBWPRichText1.ProtectedProp := [ppAllExceptForEditFields];
    DBWPRichText1.EditOptionsEx := [wpTABMovesToNextEditField,
    wpRepaintOnFieldMove];
    DBWPRichText1.InsertPointAttr.Hidden := FALSE;
    DBWPRichText1.InsertPointAttr.CodeTextColor := $0000EA00;
    DBWPRichText1.InsertPointAttr.CodeOpeningText := '[';
    DBWPRichText1.InsertPointAttr.CodeClosingText := ']';

    The user can tab between edit fields. However, if the up/down arrow keys are pressed the user can "escape" into the body of the document and highlight text and delete it.

    Am I missing a setting?

    TIA,

    John

  • For now I have disabled the up and down arrow keys to solve the problem.

    procedure TRTFViewerForm.DBWPRichText1KeyDown(Sender: TObject; var Key: Word;
    Shift: TShiftState);
    begin
    if (Key = VK_UP) or (Key = VK_Down) then Key := 0;
    end;

  • Other than the up/down keys, another circumstance which allows the user to edit what should be protected text is if they click inside of a merge field and type any keys. The field contents are not overwritten, but the cursor is advanced beyond the field limits into the protected text where they can highlight and delete text.

    Thanks,

    John