Preferred method for creating the document?

  • After defining my document and its content I find that there are four methods of TWPCustomRtfEdit that will cause the document to appear in the TWPRichText component.

    DelayedReformat, ReformatAll(True, True), Invalidate, and Refresh()

    Other than the timing of DelayedReformat the differences are not clear in the documentation. Can someone suggest where I might chose one of these over another, or point to an existing reference that explains the differences.

    Thanks.

    • Offizieller Beitrag

    Hi,

    Invalidate and Refresh don't do anything with the text.

    DelayedReformat will make sure Reforat is doen the next time the program is idle. So it will not help if you need to Print the document right anway.

    Then you need ReformatAll(false, false);

    The first parameter should be set to true if you change paragraph styles ot updated the text in paragraph using low level code.

    The second boolean switches on instant redraw.

    Julian