Page 1 of 1

Setting containing parent to nil

Posted: Thu Jul 04, 2024 4:49 pm
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

Re: Setting containing parent to nil

Posted: Fri Jul 05, 2024 10:22 am
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.

Re: Setting containing parent to nil

Posted: Fri Jul 05, 2024 11:14 am
by RaelB
Thanks for the info.