internal static WebBrowserContainer FindContainerForControl(WebBrowserBase ctl) { if (ctl != null) { if (ctl.container != null) { return(ctl.container); } if (ctl.ContainingControl != null) { WebBrowserContainer container = ctl.CreateWebBrowserContainer(); if (container.RegisterControl(ctl)) { container.AddControl(ctl); return(container); } } } return(null); }
internal static WebBrowserContainer FindContainerForControl(WebBrowserBase ctl) { if (ctl is not null) { if (ctl.container is not null) { return(ctl.container); } ScrollableControl f = ctl.ContainingControl; if (f is not null) { WebBrowserContainer container = ctl.CreateWebBrowserContainer(); if (container.RegisterControl(ctl)) { container.AddControl(ctl); return(container); } } } return(null); }