Page 1 of 1

Colour button using in tdbrichviewedit

Posted: Tue Mar 26, 2013 1:41 pm
by jota
Hi

In a form with a tdbrichviewedit object, i want insert a color button ¿perhaps a tbuttoncolor?, for changing colour text.

Is possible a small example of code that implements this management.

Thank in advance

Posted: Tue Mar 26, 2013 2:02 pm
by Sergey Tkachenko
If you use RichViewActions, place a button (for example, TToolButton on TToolBar).
Place TActionList on the form, use "Add standard action" to add TrvActionFontColor (or TrvActionFontColor).
Assign this action to the button's Action property.
No coding is required.


If you do not use RichViewActions, call ApplyStyleConversion on this button's OnClick, and implement OnStyleConversion event.
Example can be found in Demos\*\Editors\Editor2