Problem with highlight tool and fontcolor

General TRichView support forum. Please post your questions here
Post Reply
shoebuddy
Posts: 33
Joined: Thu Sep 10, 2015 5:09 pm

Problem with highlight tool and fontcolor

Post 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).
shoebuddy
Posts: 33
Joined: Thu Sep 10, 2015 5:09 pm

Post by shoebuddy »

Undo and redo also don't work.

All the above work with another editor :shock: :?
Sergey Tkachenko
Site Admin
Posts: 17564
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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?
Sergey Tkachenko
Site Admin
Posts: 17564
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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?
shoebuddy
Posts: 33
Joined: Thu Sep 10, 2015 5:09 pm

Post by shoebuddy »

I have 5 editors and only one works with the highlight and font color.
shoebuddy
Posts: 33
Joined: Thu Sep 10, 2015 5:09 pm

Post by shoebuddy »

I have some memos but they are not set up with any functions to edit
shoebuddy
Posts: 33
Joined: Thu Sep 10, 2015 5:09 pm

Post by shoebuddy »

I use ttoolbar
shoebuddy
Posts: 33
Joined: Thu Sep 10, 2015 5:09 pm

Post by shoebuddy »

I can verify it is not positioned coreectly--I see it behind the form and jutting out a bit???
Sergey Tkachenko
Site Admin
Posts: 17564
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Can you reproduce the problem in a simple project?
If yes, please send it to me.
shoebuddy
Posts: 33
Joined: Thu Sep 10, 2015 5:09 pm

Post 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?
Sergey Tkachenko
Site Admin
Posts: 17564
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Post Reply