TWPToolsCustomEditControlAction

  • I can's seem to get this to work. Have followed instructions in pdf help (btw there seems to be a problem with the chm file. None of the items you click on actually displays anything).

    Add a richtext.
    Add an action list.

    Set richtext's actionlist.

    Add a combobox.

    Add a TWPToolsCustomEditControlAction to the action list.

    Set its attached control to the combobox.

    The help file says "the property AttachedControlStyle is ignored". How then do you tell the action what it is supposed to do? Ie should it be a font or a fontsize combo.

    I am setting AttacheControlStyle to one of the font combos, but I just have an empty combobox when I run.

    How should I do this please?

    • Offizieller Beitrag

    It is meant to be used with TWPComboBox.

    The TWPComboBox is usually placed on a TWPToolBar or TWPToolPanel, but TWPToolsCustomEditControlAction makes it possible to use it on any other parent control, too.

    I recommend to write those 2 lines of code which are required to read the currrent value from your specialized combobox ( write it to the editor using CurrAttr.Interface.

    To read use the event OnCharacterAttrChange - the unit WPCtrRich.pas is the default interface between GUI controls and editor - this makes it a perfekt source for examples.

    Julian