Hi, such a question, I have Chromium1, cefwindowparent in my form and a button that opens the site when clicked, works for the first time, but if I enter a link to another site, it won't open, what could be the problem?
procedure TForm1.Button1Click(Sender: TObject);
begin
Chromium1.DefaultURL := Edit1.Text;
Chromium1.CreateBrowser(CEFWindowParent1);
end;
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.
CEFWindowParent
- salvadordf
- Posts: 4580
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: CEFWindowParent
CreateBrowser is used to create the browser and you should call it only once.
If you want to navigate to some websites you must call LoadURL like this :
https://github.com/salvadordf/CEF4Delphi/blob/6393b6f480725b1b279e944e5c26540bcf8c9192/demos/Delphi_VCL/SimpleBrowser2/uSimpleBrowser2.pas#L207
If you want to navigate to some websites you must call LoadURL like this :
https://github.com/salvadordf/CEF4Delphi/blob/6393b6f480725b1b279e944e5c26540bcf8c9192/demos/Delphi_VCL/SimpleBrowser2/uSimpleBrowser2.pas#L207