Page 1 of 1
Remove all highlighting from DBRichView...
Posted: Thu Jul 01, 2010 1:31 am
by agent86
Sometimes the user is going to hightlight certain portions of the text and after it is reviewed they will want to remove it. Is there a command that removes all highlighting? i want it to leave all other formatting.
Thanks...
Posted: Thu Jul 01, 2010 9:46 am
by Sergey Tkachenko
1)Do you want to change all text background color to transparent?
2) If yes, do you want to apply it to the selection (as an editing operation) or to the whole document (without possible undo)?
3) Do you use RichViewActions?
Remove all highlighting from DBRichView...
Posted: Thu Jul 01, 2010 4:00 pm
by agent86
I used the Editor 2 demo as the basis of the project. I used a DBRichViewEdit instead of a RichViewEdit.
Program Files/RichView/rvhelp/TRichView/Demos/Delphi/Editors/Editor 2
I want to click a speed button and all highlighting on the DBRichEdit document will go away or disappear.
Transparent, I guess so. Whatever happens when you manually highlight and make highlighting go away.
I want the entire document to have highlighting removed. I don't want to have to select the entire document if it is not necessary.
During the document creation the users highlight many portions of the document but want it all removed before printing or archived.
Posted: Sun Jul 04, 2010 7:48 pm
by Sergey Tkachenko
The simplest way to do it:
Code: Select all
// for text
for i := 0 to rvs.TextStyles.Count-1 do
rvs.TextStyles[i].BackColor := clNone;
// for paragraph
for i := 0 to rvs.ParaStyles.Count-1 do
rvs.ParaStyles[i].Background.Color := clNone;
rve.Repaint;
Thanks...
Posted: Mon Jul 05, 2010 3:01 pm
by agent86
Works great...