Recent

Author Topic: Is it possible to use a Progressbar for files downloading with Chromium?  (Read 2189 times)

Dennis

  • Newbie
  • Posts: 3
I found the great tutorial on the wiki page, http://wiki.freepascal.org/fpCEF3 , and I already can download a file from the internet.
But when I download a big file, which takes some minutes, I have no clou what the status is.

Is there a possibility to use something like a progressbar, to monitor the download status?

I googled and searched the forum the whole day but can't find any solution yet.

Kind regards,

Dennis


Dennis

  • Newbie
  • Posts: 3
Re: Is it possible to use a Progressbar for files downloading with Chromium?
« Reply #1 on: February 07, 2016, 09:52:38 am »
:) :) :) :) :) Found the solution  :) :) :) :) :)

Create an event called onDownloadUpdate, and use the const DownloadItem

For example:
procedure TForm1.ChromiumDownloadUpdated(Sender: TObject;
  const Browser: ICefBrowser; const downloadItem: ICefDownloadItem;
  const callback: ICefDownloadItemCallback);
begin
  if downloadItem.IsComplete then showmessage('Ready');
end;


Found the solution within CEF pages:
http://magpcss.org/ceforum/apidocs3/projects/(default)/CefDownloadHandler.html
http://magpcss.org/ceforum/apidocs3/projects/(default)/CefDownloadItem.html

 

TinyPortal © 2005-2018