• Hi,

    I use 2 TWPComboBoxes for fontsize and fonts. They are located on a TToolBar on my main form. I have added a TWPToolControl, whose parent is specified as my mainform.

    I am having a problem applying fonts to selected text, using these controls. Approximately two thirds of the time, a new font or size will be applied correctly. A third of the time there is no difference. You have to deselect the text and select it again and try to apply the font again.

    Any idea what might be causing this inconsistency.

    Regards,

    Mark

    • Offizieller Beitrag

    I believe the problem is caused because the control the 'thinks' the WPRichText lost the focus.
    Since applying a font is pretty easy you can also hardcode it:

    OnClick:
    WPRichText1.CurrAttr.FontName := Combo.Text.

    The TWPToolControl is also designed to sit on the same parent, not a level above.

    Julian