Jump to content
  • Advertisement
Sign in to follow this  
ctaclas

c# forms question

This topic is 4851 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi i've got a c# form, the form has a tabControl, each page has an axWebBrowser component on them. when i run my program, if i resize the window, the size of the tabControl and the axWebBrowser components stay the same size. i'd like them to resize along with the main window of the form. is there an easy way to do this? thanks

Share this post


Link to post
Share on other sites
Advertisement
All controls have a docking property that controls which sides of the window the control is attached to. When you resize, any it tries to keep the distance between the edge of the window and the control constant. So dock the tab control to the left, top, and right side, and dock the web browser to all four sides, and you should be good.

Share this post


Link to post
Share on other sites
thanks, i think that's the right direction, got one more question though
when i set the docking property the options are top bottom left right and fill. when i have fill it overlaps a toolbar i have at the top of the window. is there a way to get it so it stretches the tabControl but leaves the toolbar intact?

Share this post


Link to post
Share on other sites
A solution to that problem is to position the tab control where you want it, and then set the anchor property to all corners.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!