Page 1 of 1

Problem with highlight tool and fontcolor

Posted: Sat Nov 14, 2015 8:03 am
by shoebuddy
I've created an editor and for some reason the two tools that allow highlighting and fontcolor (set to RVETextrvActionFontColor1 and RVETextrvActionFontBackColor1) aren't working. When I click on either, the entire toolbar becomes inactive.

Sorry I'm a newbie with Delphi and having a problem figuring out what I'm doing wrong. All other tools work (underline, bullets, etc).

Posted: Sat Nov 14, 2015 8:04 am
by shoebuddy
Undo and redo also don't work.

All the above work with another editor :shock: :?

Posted: Sat Nov 14, 2015 8:19 am
by Sergey Tkachenko
By default, these actions should show a color picker window below the action's button. Probably, they calculate button position incorrectly.
What component do you use for toolbar?

Posted: Sat Nov 14, 2015 8:21 am
by Sergey Tkachenko
Editing actions (including undo, copy and paste) may work not only with TRichViewEdit, but with other controls too (TEdit, TComboBox, TMemo).

How many RichViewEdits are in your applications? Do you have other editing contols (TEdit, etc.)?
May be the actions work not with the editor you expect?

Posted: Fri Nov 27, 2015 9:23 am
by shoebuddy
I have 5 editors and only one works with the highlight and font color.

Posted: Fri Nov 27, 2015 9:24 am
by shoebuddy
I have some memos but they are not set up with any functions to edit

Posted: Fri Nov 27, 2015 9:25 am
by shoebuddy
I use ttoolbar

Posted: Fri Nov 27, 2015 9:28 am
by shoebuddy
I can verify it is not positioned coreectly--I see it behind the form and jutting out a bit???

Posted: Fri Nov 27, 2015 12:23 pm
by Sergey Tkachenko
Can you reproduce the problem in a simple project?
If yes, please send it to me.

Posted: Mon Dec 21, 2015 12:14 pm
by shoebuddy
I use some controls (devexpress dxlayout control) that may have some impact on the color pickers showing. They aren't showing on top of the form but underneath. Can I use another color picker?

Posted: Mon Dec 21, 2015 2:56 pm
by Sergey Tkachenko
The coloring actions can work in a silent mode, without displaying a color picker.
Assign Action.UserInterface = rvacNone.

When the user clicks the button:
- show your color picker
- assign Action.Color := color picker color
- call Action.ExecuteTarget(Editor)

The only problem is initializing color picker with the color from editor. It could be done with Action.GetCurrentColor method, however, this method is protected. If you need, I can make it public in the next update.