• Hi all -

    Would it be possible for someone to make up a simple text editor demo that does not use the toolbar, but instead implements the basic 'text editor' features such as font, font size, bold, alignment, tabs, etc with code as opposed to the linked toolbar?

    This would be great for those of us that need to implement their own toolbars and/or menu systems.

    Thanks in advance,

    Alan

    • Offizieller Beitrag

    Please open the file WPCTRRich.PAS and check out the function OnToolbarIconSelection. That is executed for each button click and all the standard actions also call this function.

    The function internally uses the WPRichText.CurrAttr to add/del font styles, calls up Load/Save to show the dialogs etc.

    In general it is best to use the action classes, ypou don't nee TWPToolBar for an editor, just the actions.

    A simple editor as you suggest is in unit WPDefEditor.PAS - that uses the default actions which can be used from your application, too.

    Julian Ziersch