Changes

Jump to: navigation, search

Designing Forms in Visual Studio

1,383 bytes added, 18:19, 20 July 2007
Aligning and Sizing Groups of Controls
All together, the selection of controls allow just about any uniform layout to be achieved from a group of controls in a form.
== Setting Properties on a Group of Controls == In addition to changing the size and layout of a group of controls it is also possible to set properties simultaneously on the group. When multiple controls are selected as a group the Visual Studio ''Properties'' panel changes to list only the properties which are common to all the control types comprising the group. Changing a property value in the properties panel applies that change to all selected controls. == Anchoring and Autosizing == All the controls we have worked with so far have been a fixed size. They have also remained that same size, even if the form in which they reside is resized. It is often useful to have a control resize when the form is resized. This is achieved using the ''Anchor'' property. To use this property, select a control in a form and click on the down arrow in the value field of the ''Anchor'' property in the Properties panel. A graphic will be displayed indicating the anchors currently set (typically the top and left edges of the control). Activate the anchors on the right and bottom edges of the control to anchor those sides: [[Image:Exampl.jpg]]  Once the anchors are in place, press '''F5''' to compile und run the application. When the form is displayed and resized, the control with the anchors will grow in proportion to the size of the form. == Setting Tab order in a Form ==

Navigation menu