Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Back and forward buttons

Post Reply
Hitman
Posts: 73
Joined: Sat May 20, 2017 11:08 am

Back and forward buttons

Post by Hitman »

Hi guys,
i need to do this,
"procedure TForm1.WebBrowser1CommandStateChange(Sender: TObject;
Command: Integer; Enable: WordBool);
begin
case Command of
CSC_NAVIGATEBACK: ButtonBack.Enabled := Enable;
CSC_NAVIGATEFORWARD: ButtonForward.Enabled := Enable;
CSC_UPDATECOMMANDS: ButtonCancel.Enabled := Enable;
end;
end;

procedure TForm1.ButtonBackClick(Sender: TObject);
begin
WebBrowser1.GoBack
end;

procedure TForm1.ButtonForwardClick(Sender: TObject);
begin
WebBrowser1.GoForward
end;"

What is the event for this?
My sample is used for TWebBrowser.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Back and forward buttons

Post by salvadordf »

Hi,

Use the TChormium.OnLoadingStateChange event.

The MiniBrowser demo has all that code in the TMiniBrowserFrm.Chromium1LoadingStateChange procedure.
Hitman
Posts: 73
Joined: Sat May 20, 2017 11:08 am

Re: Back and forward buttons

Post by Hitman »

salvadordf wrote: Sun Mar 11, 2018 9:02 am Hi,

Use the TChormium.OnLoadingStateChange event.

The MiniBrowser demo has all that code in the TMiniBrowserFrm.Chromium1LoadingStateChange procedure.
It indeed does :D
Thanks a lot!!
very much appreciated.
Post Reply