Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
XML RSS Feed
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleMake a dialog that stretches controls on the right to take advantage of its full size in VB .NET
Keywordsstretch, Anchor, VB .NET
CategoriesControls, VB.NET, Software Engineering
 
Many dialogs have controls that can stretch to the right when the form resizes. For example, a contact entry might have a series of Labels and TextBoxes for name, address, and so forth. When the form gets wider, it is useful to make the TextBoxes wider to use the available space.

Position the controls. Then set the TextBox's Anchor properties to Top, Left, Right. The rest is automatic.

If you want controls to the right of those that stretch, for example OK and Cancel buttons, set their Anchor properties to Top, Right.

 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated