Page 1 of 1

Refresh table styles

Posted: Wed Dec 07, 2011 12:43 pm
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

Posted: Wed Dec 07, 2011 5:25 pm
by Sergey Tkachenko
After changing colors in RVStyle, call RichViewEdit1.RefreshAll.