Attention: Important note about property "RTFText"

    • Offizieller Beitrag

    Please note that the property RTFtext of the TWPRichText or the TWPRichText label is not a reference to the "RTF-Engine" in WPTools 5 as it was in WPTools 4.

    It is basically a storage for formatted text - in its native stream format.

    It can store RTF, WPT, HTML and ANSI format (click right on TWPRichText object in the IDE to select the Load or Save operation)

    When a form is loaded at startup the text which is stored in 'RTFText' will be loaded into the owner object, the editor.

    This is done by a call to 'RTFText.Apply' in the 'Loaded' procedure.
    You can reapply this initial text anytime!

    If you use 'Assign' you will only change this stored text, NOT the text in the editor. And if you save the text from 'RTFText' you will save the initial text, not the current text.

    To load the current text into the RTFText property use 'RTFText.Update'.

    So please check all the assignments to RTFText and replace them better with
    WPRichText1.AsString := WPRichText2.AsString;

    The big advantage of the new system is that the text which is loaded once into "RTFText" is not changed - this means it stays in its original format! It can also be reapplied anytime which is perfect if you need to use it as a template.

    Julian Ziersch