Executing TrvActionFontColor closes the parent PopupEdit

General TRichView support forum. Please post your questions here
Post Reply
Alexander_Dober
Posts: 130
Joined: Fri Mar 04, 2011 3:44 am

Executing TrvActionFontColor closes the parent PopupEdit

Post by Alexander_Dober »

Hello,

I'm using RichViewEdits + toolbars with some RichViewActions on them in two different ways:

1. On a normal form, which is being showed modal
2. On a form, which gets assigned to a cxGrid column as its PopupEdit

In the second case there is a problem, that once I execute the ToolButton with TrvActionFontColor assigned to it, the ColorPicker gest showed, which closes my PopupEdit, so that only the ColorPicker remains visible and any selected color doesn't have any effect.

Is there a way to change this behaviour somehow? To pass in a panel placed on the form, which gets filled with color selection buttons without to show the ColorPicker-form maybe?

Wanted to try to use a RVColorCombo, but
- don't see how to get it to work with a certain RichViewEdit and
- it seems to use the same ColorPicker as the TrvActionFontColor
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

You can use any colorpicker control (provided by DevExpress, or RVColorGrid).
When the color is chosen, the simplest way to apply it to text is using TrvActionFontColor in a "silent" mode:

Code: Select all

rvActionFontColor.UserInterface := rvacNone;
rvActionFontColor.Color := RVColorGrid.ChosenColor
rvActionFontColor.ExecuteTarger(RichViewEdit);
// here you can restore the old value of rvActionFontColor.UserInterface
Post Reply