Refresh table styles

General TRichView support forum. Please post your questions here
Post Reply
infrax
Posts: 31
Joined: Wed Aug 10, 2011 10:57 am

Refresh table styles

Post by infrax »

I'm using this to highlight all hyperlinks in a document.

Code: Select all

for i := 0 to RichViewEdit1.style.TextStyles.Count - 1 do begin
      if RichViewEdit1.Style.TextStyles.Items[i].Jump then begin
          RichViewEdit1.Style.TextStyles.Items[i].BackColor := clLtGray ;
          RichViewEdit1.Style.TextStyles.Items[i].HoverBackColor := clLtGray;
      end;
    end;
But if you have a table with some hyperlinks and also the caret position is in that table.
After I run this code no hyperlinks in this table will highlight. Only when I exit this table (caret is outside) they will highlight.

There is probably some function I must call to refresh styles.

Thanks
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

After changing colors in RVStyle, call RichViewEdit1.RefreshAll.
Post Reply