Automatically sizing a dialog/form to match its content

17 views
Skip to first unread message

Oliver Bock

unread,
Aug 10, 2016, 7:42:24 PM8/10/16
to CefSharp
I am embedding a ChromiumWebBrowser to take the whole of a Windows.Forms form.  I want my HTML to draw a dialog box, and I would like the form to appear at the correct size for this dialog box.  That is, I would like to set the height of the form's client area to document.height.  I can get this to work, but the problem is that ChromiumWebBrowserdoes not run the JavaScript code until it becomes visible.  Therefore the form first appears at its default height and then resizes to match document.height, which is ugly.  How can I let the JavaScript run before the form is visible?


  Oliver
Reply all
Reply to author
Forward
0 new messages