Page 1 of 1
URLScan and TDBRichView ?
Posted: Tue Feb 11, 2025 12:01 pm
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 !!!
Re: URLScan and TDBRichView ?
Posted: Tue Feb 11, 2025 12:24 pm
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.
Re: URLScan and TDBRichView ?
Posted: Tue Feb 11, 2025 1:18 pm
by Fab85
Yes it can work on a TCustomRichView but when (which event) you call it ?
Because TDBRichView automatically load and format is content !
Re: URLScan and TDBRichView ?
Posted: Tue Feb 11, 2025 3:37 pm
by Sergey Tkachenko
Use OnLoadDocument event.
This event occurs after loading a document from DB.
Re: URLScan and TDBRichView ?
Posted: Wed Feb 12, 2025 9:03 am
by Fab85
Hello,
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 ?
Re: URLScan and TDBRichView ?
Posted: Thu Feb 13, 2025 1:31 pm
by Sergey Tkachenko
For TcxTRichViewEdit, use Properties.OnLoadValue event.