ProtectedProp := [ppAllExceptForEditFields]

  • Is this the only property you have to set, to enable the protection of Form text that has form fields in it. I have tried a couple of combinations and either that I can't enter any text at all, with the property set like the title.

    If I comment out the line, then I can enter values for the FormFields, but I can erase the preformatted text and we don't want them to be able to do that

    Code
    FEditor.ProtectedProp := [ppAllExceptForEditFields];
    FEditor.EditOptionsEx := [wpTABMovesToNextEditField, wpRepaintOnFieldMove];
    FEditor.InsertPointAttr.Hidden := True;

    After more testing, the text on the form can be selected and deleted, which can't be allowed in the specs that I have, if the ProtectedProp was assigned the value or not.

    TIA,

    Green_Flyer

  • Actually, I based my test code on that example, except I don't get the same results as you ....

    That's why I was wondering if there was any other options, parameters or whatever that needs to be set to obtain the same results as your demo.


    The only difference that I see, is that your text is already set, I have to get it from a database, but don't feel that should change anything ....

    And yes I can't erase the text in your EditField demo...

    Will keep on looking in your demo, I most have missed something.

    But if you think of something to check that is required to obtain the same results as you, well post it, if I find I'll tell you what I forgot

    TIA,
    Green_Flyer

  • I was missing a couple of lines after the text was inserted in the Editor.

    Code
    FEditor.HideSelection;
          FEditor.MoveToNextField(True);
          FEditor.SetFocus;

    Now, how can I can go back and forth in the EditFields with Tab / Shitf+Tab?


    Green_Flyer

  • I had the same problem on my project, even after I've added the three lines you mentioned. The solution on my problem was to set the following property:

    Code
    FEditor.ProtectedProp := [ppProtectSelectedTextToo, ppAllExceptForEditFields];

    To tab (TAB / CTRL+TAB) around in your form try setting:

    Code
    FEditor.EditOptionsEx := [wpTABMovesToNextEditField, wpRepaintOnFieldMove];