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.

Setting containing parent to nil

Post Reply
RaelB
Posts: 26
Joined: Sun Feb 12, 2017 11:22 am

Setting containing parent to nil

Post by RaelB »

Hi Salvador,

I'm trying a similar thing with WebView4Delphi. In the SimpleBrowser demo, I place the WVWindowParent on a Panel.
If I set the Panel.Parent := nil, and then afterwards set the Parent back to the Form (Panel.Parent := Self), the browser/WVWindowParent is no longer visible.

Is there a way around this? Or something to do before I set Panel.Parent to nil (e.g. "PauseRender"), so that after I reset the Parent to Form, then I can get the browser/WVWindowParent to re-render, or ResumeRender.

My existing application currently works with these steps, so I'm trying to get these steps to work with WebView.

Thanks
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Setting containing parent to nil

Post by salvadordf »

Hi,

Read this issue to know all the details about reparenting a WebView4Delphi browser :
https://github.com/salvadordf/WebView4Delphi/issues/13

WebView2 browsers behave like CEF browsers when the application calls RecreateWnd.
It's necessary to follow the previous steps.
RaelB
Posts: 26
Joined: Sun Feb 12, 2017 11:22 am

Re: Setting containing parent to nil

Post by RaelB »

Thanks for the info.
Post Reply