Drag and drop an htmll file on HTMLViewer?

Is it possible to drag and drop an htmll file on HTMLViewer ?

I do not found the appropriate Event.

My url TextField does not works, so I add a button with OpenDialog and that works, but I am testinf html code and I have to click / select / OK for each modification I do to the html file and this is boring (and not intuitive !)

HTMLViewer does not have the DropObject event. Use WKWebViewControlMBS instead, it has the event.

Thank you Peter.

Unfortunately, it is a home application, so no external (paying) plug-in…

1 Like

Then perhaps you can add a control “Drop Here” that has a Drop event and drop the HTML onto that, updating the HTMLViewer when it receives the drop.

1 Like

Use the cancelload event of the HTMLViewer, and grab the URL to the file folderitem. You can cancel the URL file re-direction, load the file, then call whatever code needed; passing data to and from the HTMLViewer.

Or I can simply add a Reload (either a button or a MenuItem) and only have to choose the file once…

At night, the ideas box opens :grinning:

Thank you all.

1 Like