URLScan and TDBRichView ?

General TRichView support forum. Please post your questions here
Post Reply
Fab85
Posts: 33
Joined: Tue Apr 09, 2024 6:02 am

URLScan and TDBRichView ?

Post by Fab85 »

Hello,

You have an interesting demo called "ScanURLs" which work fine for custom URL for example.

But how to implement is in a TDBRichView/TDBRichViewEdit ?
Problem it is that this component use it"s own loadfromstream + format !!!
Sergey Tkachenko
Site Admin
Posts: 17842
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: URLScan and TDBRichView ?

Post by Sergey Tkachenko »

This demo includes URLScan.pas unit containing all the important functions that are used in this demo.
ScanURLs() and ClearHypertext() work for TRichView, TRichViewEdit, TDBRichView. TDBRichViewEdit.
DetectURL(), TerminateHyperlink(), PasteTextWithURLs() work for TRichViewEdit and TDBRichViewEdit.
Fab85
Posts: 33
Joined: Tue Apr 09, 2024 6:02 am

Re: URLScan and TDBRichView ?

Post by Fab85 »

Yes it can work on a TCustomRichView but when (which event) you call it ?
Because TDBRichView automatically load and format is content !
Sergey Tkachenko
Site Admin
Posts: 17842
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: URLScan and TDBRichView ?

Post by Sergey Tkachenko »

Use OnLoadDocument event.
This event occurs after loading a document from DB.
Fab85
Posts: 33
Joined: Tue Apr 09, 2024 6:02 am

Re: URLScan and TDBRichView ?

Post by Fab85 »

Hello,
Sergey Tkachenko wrote: Tue Feb 11, 2025 3:37 pm Use OnLoadDocument event.
Unfortunately I use a TcxDBTRichViewEdit where OnLoadDocument isn't published ?!

So I have done :

Code: Select all

  MyTcxDBTRichViewEdit.InnerEditor.OnLoadDocument:=   MyTcxDBTRichViewEditOnLoadDocument;
But it's seems to be never executed ?
Sergey Tkachenko
Site Admin
Posts: 17842
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: URLScan and TDBRichView ?

Post by Sergey Tkachenko »

For TcxTRichViewEdit, use Properties.OnLoadValue event.
Post Reply