Forum > SynEdit

ATSynEdit and URL Highlighter [solved]


if I assign a text, including an URL to an ATSynEdit, the URL is displayed in blue color. So far OK.
If I now assign a text without an URL, the previous highlight position will still be retained.

Am I doing something wrong or is there an error in ATSynEdit?

Here is a sample, that shows the "error".
First click the "Set URL Text" button, then the "Set Text Lines" button

Thanks for note. I just fixed the .SetText method to:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TATSynEdit.SetText(const AValue: UnicodeString);begin  Strings.LoadFromString(UTF8Encode(AValue));   DoCaretSingle(0, 0);  if Assigned(FMarkers) then    FMarkers.Clear;  if Assigned(FAttribs) then    FAttribs.Clear;  if Assigned(FLinkCache) then    FLinkCache.Clear;   Update(true);end;    

thanks in advance Alex!
That answer was realy quick  :)


[0] Message Index

Go to full version