Sunday, 15 September 2013

Resizing custom user control according to data in the webBrowser control docked in it

Resizing custom user control according to data in the webBrowser control
docked in it

I have a webBrowser control named webBrowser1 that is added and docked as
DockStyle.Full on a custom user control. The web-browser accepts some HTML
text dynamically and displays it. I disabled the scroll bars of the
webBrowser control. My problem is that whenever the content is somewhat
lengthy, the webBrowser hides it from below. But the requirement of my
project objective is that the webBrowser must not show either scroll bars
or it should not hide some of the content. The content must be completely
shown as it is without scrolling. That means the user control on which the
webBrowser is docked must resize iteself according to webBrowser's
content. So, can anyone please suggest me how to achieve this? I searched
all over the internet and SO but found nothing.

No comments:

Post a Comment