Page 1 of 1

TRichView and URL's

Posted: Sun May 06, 2007 8:37 am
by LonelyRanger
Hello,

I have viewed the demos and searched extensively in this forum but I am still having a problem autodetecting URL's in a "TRichView". From what I can gather, the demos are based around TRichViewEdit as I get compile errors.

eg: Incompatible types: 'TCustomRichViewEdit' and 'TRichView'

Could you please point out what I am doing incorrect please or how to go about it. Please note this is in a TRichView, not a TRichViewEdit.

Thankyou in Advance,

Posted: Sun May 06, 2007 9:48 am
by Sergey Tkachenko
Obviously, it's not possible to detect URLs on typing in TRichView. Because TRichView is not an editor and you cannot type in it. Use TRichViewEdit instead.

As for detecting all URLs in document, procedures ScanURLs and ClearHypertext (from the demo's ScanURLs.pas) can be called both for TRichView.RVData and TRichViewEdit.RVData.

Posted: Sun May 06, 2007 11:09 am
by LonelyRanger
Thank you. That fixed it.