• In the FormCreate handler of your TextPath demo (TextP), you make reference to the "broadcasting system", where you make a series of consecutive calls to <TWPRichText>.HandleNeeded.

    Can you please give us some background, additional use, etc, of Broadcasting, and where it might be of use and interest to users, above and beyond the Text Path demo? I looked through the documentation, but didn't find much on it. It seems intriguing.

    Thank you...:)

  • The broadcasting is mainly used internally to delay the reformat or update of GUI.

    For example if you use several InputString in a row the reformat will not take place until the application is idle again. This means you don't need BeginUpdate/EndUpdate and the code will be still executed very fast.

    (If your code relies on a reformat of the text you can force it with 'ReformatAll')

    The broadcasting is also used to force a repaint in all RTF-Engines which are attached to one RTF text, for example if "text paths" are edited or if the new multi view technology is used.

    The broad cast messages are mostly sent out by the RTFData object (to all RTF engines) and partly processed by the RTF-Engine and/or the wrapper, the TWPRichText.

    For a delayed processing a windows handle is required, so only the TWPRichText can do this. The TWPRichTextLabel cannot delay the reformat and will executed broadcasted messages at once.

    The text path demo uses TWPRichText which are placed on a TPageControl. A TPageControl delayes the creation of the contained controls until the control has to be actually displayed. This works agaianst the broadcasting system which requires a windows handle for all TWPRicHText which are attached to the one RTF-Text (te text path) so we use HandleNeeded to create the handle.


    Julian Ziersch