Can't figure out why this doesn't work.
It has no effect on the color of the text. I just want to detect all white text in the document and change it to black, leaving all other colors how they exist.
Thanks for any help.
if wprichtext1.PaperColor = clblack then
begin
wprichtext1.PaperColor := clwhite;
wprichtext1.SelectAll;
progressbar.Maximum := wprichtext1.SelLength;
progressbar.Update;
WPRichText1.CPPosition := 0;
with WPRichtext1.cpattr do
begin
beginupdate;
WPRichtext1.CPPosition := 0;
repeat
if WPRichText1.CPAttr.Color = clwhite then wprichtext1.CPAttr.Color := clblack ;
progressbar.Position := wprichtext1.CPPosition;
progressbar.Update;
until wprichtext1.CPMoveNext = FALSE;
endupdate;
end;
wprichtext1.HideSelection; wprichtext1.Refresh;
wprichtext1.CPPosition := lastpos;
wprichtext1.Refresh;
end else