c# forms question

Started by
3 comments, last by ctaclas 18 years, 9 months ago
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
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.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
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?
A solution to that problem is to position the tab control where you want it, and then set the anchor property to all corners.
Ollie"It is better to ask some of the questions than to know all the answers." ~ James Thurber[ mdxinfo | An iridescent tentacle | Game design patterns ]
awesome dude thanks thats exactly what i was looking for

This topic is closed to new replies.

Advertisement