Sign in to follow this  
ctaclas

c# forms question

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this