WorkOnText, ActiveText, DisplayedText - what is this?

  • WPTools 5 has the ability to store different text blocks in one RTFData collection. (WPRichText1.Memo.RTFData).

    Each of this elements is a TWPRTFDataBlock. The TWPRTFDataBlock can be the body text (currently only one at a time) or header or footer texts.

    In PageLayout mode the RTF-Engine can display several of this blocks on the same virtual page. The TWPRTFDataBlock which delivers the part which is distibuted on several pages (page break) must be of the kind 'wpIsBody'. The TWPRTFDataBlock which is the main block is selected by the property DisplayedText.

    The cursor can be also in the header or footer area. This is changed by the property ActiveText or (WPRichText.Memo.Cursor.RTFData).

    The property WorkOnText is the old fasioned way to change the ActiveText. If you set it to wpIsHeader the header will be the active text and subsequent InputString commands will modify this TWPRTFDataBlock.

    Any comments and follow up questions are very welcome.

    Julian Ziersch

  • Julian,

    Hi...:)

    Zitat

    The TWPRTFDataBlock which delivers the part which is distibuted on several pages (page break) must be of the kind 'wpIsBody'. The TWPRTFDataBlock which is the main block is selected by the property DisplayedText.


    The first part of that is clear, where you talk about the TWPRTFDataBlock that is of kind 'wpIsBody'. With apologies, I don't understand what is then meant by the next sentence, referring to the "main block", and DisplayedText. Is "main block" referring to the currently active text (that's in the Editor which currently has focus).

    And could you please amplify a bit on DisplayedText?

    Thanks...:)

    diamond

    • Offizieller Beitrag

    You see the header, the footer and the body part. The property DisplayText will always reference to the body part if any of the page - LayoutModes had been selected.
    'ActiveText' (aka 'CursorOnText') however can be either of the the three, body, header and footer.

    In normal layoutmode the DisplayText property can be also set to a body or header text.

    BTW.: If many editors use the same RTFData object the layoutmode for each of the editors may be different. So it is possible that one editor edits the header in normal layoutmode while the other displays it in fullpage mode. The "HeaderFooter" demo shows this.

    Julian Ziersch

    BTW - many thanks for helping to be precise :-)