|
|
Title | Make a dialog that stretches controls on the bottom and right to take advantage of its full size using the Dock property in VB .NET |
Keywords | stretch, Dock, VB .NET |
Categories | Controls, VB.NET, Software Engineering |
|
|
Some controls such as ListBox, ListView, and DataGrid can display large amounts of data. If you put one of these controls on the bottom of a form and make it resize itself when the form gets taller, you can display as much data as will fit on the form.
If you want a control at the top that doesn't expand vertically, set its Dock property to Top. Then select the control that you want to expand vertically and set its Dock property to Fill. The rest is automatic.
When you resize the form, the upper control resizes horizontally to fill the form's width but it keeps its original height. The lower control fills the rest of the form.
|
|
|
|
|
|