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.

CEFWindowParent

Post Reply
amiran6543
Posts: 15
Joined: Sun Dec 05, 2021 12:07 pm

CEFWindowParent

Post by amiran6543 »

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;
User avatar
salvadordf
Posts: 4580
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: CEFWindowParent

Post by salvadordf »

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
Post Reply