Header/Footer double vision

  • When using the Header/Footer manager, if there is no body text, just header text, the page shrinks to just the size of the header (ok I guess, but my users might get freaked out)

    Now if you then "paste" new text into the header, you get double vision (text overlaps and some of that overlapped text is duplicate). Just keying in text works fine.. it's the CTRL+V paste operation when the page has no body text that causes the problem. Pasting into the header when there is body text seems to work OK.

    If you exit and come back in, it appears correct, but paste some new text again, and back comes the double vision.

    To repro, bring up the header/footer manager and have just header text so that the page becomes shortened to the header height. Go to the home position and paste in some multilined text.. view the ugly results.

    At one point after a paste, I was backspacing and got an Access Violation, but have not been able to reproduce it to be able to send you more info on that error... so just a heads up (might be related tot he double vision).

    WPTools 5.18.5, Delphi 7

    • Offizieller Beitrag

    Hi,

    The unit dialog WPManageHeaderFooter will select a certain header or footer text as single displayed text (WP.DisplayedText) if the text would be otherwise invisible since not selected by the body.
    For example if you add a header for "all pages except for first page" and there is only one page in the document it will select that header to be the only text in the editor (and you see a shrinked page). The user who "freaks out" please tell s/he should try with "Word" to add such a header/footer - there is no way.

    Having no body text is a quite unusual. Normally a siple SetFocus will select a new empty body. The procedure CheckHasBody does it. If you do a clear make sure you also do a CheckHasBody.

    Julian

  • Try this sequence... I used WPTools 5.18.5

    1. start a new Delphi 7 app

    2. slap a WPRichText onto the form

    3. double click the RTFText property to launch the WPTools editor

    4. Click View + Manage Header and Footer menu sequence

    5. Click Add Header - All Pages

    6. Click Add Header - First Page Only

    7. Now select "Header all pages" from the manager's list of headers available which should then show a shorten page height just encompassing the header

    8. Add three or four lines of text

    9. Select two or three lines by highlighting them and press CTRL+C to copy them to the clipboard

    10. place text cursor in the home position of the header (cursor doesn't have to be in the home position, just somewhere other than the last line)

    11. press CTRL+V to paste the clipboard

    Note the overlapping text, which I call "double vision"