Hi,
I made a small modification to SimpleBrowser2, i.e. placed CEFWindowParent1 on a Panel (Panel1)
Calling:
Panel1.Parent := nil
or
CEFWindowParent1.Parent := nil
or
Panel1.Parent := Panel3
all result in FormCloseQuery being called (i.e. sends WM_CLOSE), and so the app exits.
Is it possible to do any of the above, without the app closing?
I want to be able to show/hide, or remove (i.e. set Parent nil) and then replace (i.e. set Parent to existing panel) the CEFWindowParent.
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.
Setting Parent nil closes Form/App
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Setting Parent nil closes Form/App
Hi,
The VCL might be calling recreatewnd when you set the parent to nil and the child browser thinks the application is closing.
Call TChromiumCore.SetNewBrowserParent to reparent the browser to a different TCEFWindowParent.
The VCL might be calling recreatewnd when you set the parent to nil and the child browser thinks the application is closing.
Call TChromiumCore.SetNewBrowserParent to reparent the browser to a different TCEFWindowParent.