"Finished" two times
Posted: Wed Sep 04, 2019 12:14 pm
Tell me please. Why is "Finished" inserted 2 times in the memo?
Thanx.
Thanx.
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
if Chromium1.Initialized then
begin
Chromium1.WasHidden(False);
Chromium1.SendFocusEvent(True);
Chromium1.LoadURL(edUrl.Text);
end
else
begin
Chromium1.Options.BackgroundColor := CefColorSetARGB($FF, $FF, $FF, $FF);
Chromium1.DefaultURL := edUrl.Text;
Chromium1.CreateBrowser(nil, '');
end;
end;
Code: Select all
procedure TForm1.Chromium1LoadingStateChange(Sender: TObject;
const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean);
begin
if isLoading then
begin
StatusBar1.Panels[1].Text := 'Loading...';
Memo1.Lines.Add('Loading...');
end
else
begin
StatusBar1.Panels[1].Text := 'Finished';
Memo1.Lines.Add('Finished');
end;
end;