Controlling the size of the control

Topics: Developer Forum, Project Management Forum, User Forum
Mar 11, 2008 at 4:57 PM
I know about the MinimumSize attribute, but other than that, is there any way to better set the size of the control? I want the control to fill out the rest of the space when it is placed in a tab control. If the user resizes Visual Studio, I want the control to float with the boundary of the tab control

Currently, without a MinimumSize attribute, the control seems to float to the right edge of the tab control, but not to the bottom. It leaves empty space below the control. This is really inconvenient with the web browser control, because you don't get a very much room to view the browser page.

In Windows Forms applications, this type of behavior is easy to create by using the .Anchor property and setting it to Top | Left | Bottom | Right. I tried this with the web browser control, but it didn't work. I think Team Explorer ignores any .Anchor property set by the control constructor, and probably resets it to what it wants.

Apr 10, 2008 at 7:37 PM
Edited Apr 10, 2008 at 7:38 PM
This msdn article might be useful: