How to drag a text string and its hyperlink from an HTML page to TEdit

I hope to drag the text string and its hyperlink from the HTML page to TEdit. for instance

displays aaa

actual line <a href=somewhere.html>aaa</a>

I am trying to use drag & drop vcl, but found that it can only catch aaa , not the string and its hyperlink.

Welcome any comment

Thanks InterDev

+4
source share
2 answers

Go download Anders Melander for free Drag & Drop component package . In it you will find TDropURLTarget to put on your uniform. Set the Target property to access your TEdit control, and when the URL is removed there, the properties of the URL and Title component will be updated so that you can check them during the OnDrop event OnDrop . The suite comes with a few examples; TargetDemo has the basics.

+4
source

Another good library is Raize DropMaster.

In any case, I believe that you can do what you want, but maybe it will be HTML or RTF drag and drop? Hard to tell. For example, I can drag the list of hyperlinks to this page (there on the right, under "RELATED") in Word, and they all appear with hyperlinks on board. So it is possible. But I suspect WinWord is being discarded as HTML.

Anyway, Rob’s suggestion to look at the examples is good - between this library and Raize, you should find what you can use as a prototype.

0
source

Source: https://habr.com/ru/post/1308991/


All Articles