Problem with Hidden text

  • This used to work on in 4.x but something is a bit different in v5.

    I will have some normal text adjacent to some hidden text.

    for example

    This is normal text.{this is hidden}

    I have the HiddenTextAttr.Hidden set to True. ppHidden is NOT included in the ProtectedProps. If I click at the end of the line (normal text.) I can not enter text. It's like it is protected, but it is not configured to be protected.

    If I turn the HiddenTextAttr.Hidden back to False, I can then enter text, but the text that should be hidden is now visible, obviously. It's like when I click near the end of the line, the cursor is somehow 'in' the hidden text area and acts as though it is in a protected text area, but it is not.

    Any ideas on how to get around this?

  • Well, there's a few million documents using this, with 10+ instances in each one so I can't really parse them all and do all that.

    I guess I will try to 'back up' out of the hidden text to see if that will work.

    Any other ideas?

    • Offizieller Beitrag
    Zitat

    I've found some other problems with afsHidden.

    When afsHidden is set to protected, you can still type in it. This is true
    whether the Hidden is
    visible or not. Try hiding it, and typing, then unhiding and you will see.

    I have to get this sorted out somehow.

    In your demo I can type before or after the hidden text. If it is visible or not makes no difference.

    This flag in ProtectedProp improvesthe situation:
    ppDontUseAttrOfProtected - inserted text is not hidden

    As always you can add code to the OnKeyPress event and use CPAttr, CPChar to check where in the document you are. This way you can warn the user if s/ tries to insert text between your tag and the hidden text.

    Julian

  • So being able to type into text that has the HiddenText attribute, that is hidden, and is included as a protected property, is the expected normal behavior?

    Also, the ProtectedText attribute seems to behave quite differently. It just seems that there are some inconsistencies between how these are handled, and they are definitely different from v4, ie not backward compatible.

    This is kind of a huge problem for us because we have to make v5 work 'seamlessly' with over a million ( thats 1,000,000+) documents that were created using v4.

    • Offizieller Beitrag

    Hi,

    >>So being able to type into text that has the HiddenText attribute, that is hidden, and is included as a protected property, is the expected normal behavior?<<

    I think I just told you the flag which avoids the typing of hidden protected text?

    >> Also, the ProtectedText attribute seems to behave quite differently. It just seems that there are some inconsistencies between how these are handled, and they are definitely different from v4, ie not backward compatible. <<

    The code is pretty similar which checks for protected attribute, if you found a concrete difference I check out if I can check something. As I recall V4 behaved exactly the same as V5 in this matter.

    >>This is kind of a huge problem for us because we have to make v5 work 'seamlessly' with over a million ( thats 1,000,000+) documents that were created using v4.<<

    Julian

  • I think I just told you the flag which avoids the typing of hidden protected text?

    Can you explain how this flag has changed? It's always been set to false in v4 and this behavior did not exist there.

    Thanks