[Gambas-user] "_Download ()" Event of "WebView"

Benoit Minisini benoit.minisini at gambas-basic.org
Mon Sep 19 19:52:51 CEST 2022


Le 17/09/2022 à 18:11, vuott--- via User a écrit :
> Hello,
> can someone explain to me  (even by inserting an essential code)  how 
> the "_Download ()" Event of "WebView" Class works ?
> 
> Regards
> vuott
> 

You have a "WebBrowser" project in the source code examples that will 
show you how to use the 'Download' event.

Basically, the 'Download' event is raised when the WebView requests a 
download for a file it cannot directly handle.

The 'Download' event receives a 'WebDownload' object that allows to 
define where the download must be saved, to follow the download 
progression or to cancel it.

If you stop the 'Download' event, or if you don't define the 'Path' 
property of the WebDownload object, the download is cancelled.

Note that the 'Download' event is only implemented in the deprecated 
webview, not the new one.

Regards,

-- 
Benoît Minisini.


More information about the User mailing list