Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Enable/Disable Back and Forward buttons based on available history #1

Open
birbilis opened this issue Apr 16, 2020 · 0 comments

Comments

@birbilis
Copy link
Contributor

quoting from
http://dn.embarcadero.com/article/27726

These buttons are currently disabled and we only want them enabled when appropriate. To do this we will use the TWebBrowser's OnCommandStateChange event. The code should look like this:

procedure TForm1.WebBrowser1CommandStateChange(Sender: TObject;
  Command: Integer; Enable: WordBool);
begin
  case Command of
    CSC_NAVIGATEBACK: btnBack.Enabled := Enable;
    CSC_NAVIGATEFORWARD: btnForward.Enabled := Enable;
  end;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant