When you select a control, the Properties window allows you to view and edit the control’s properties. For most properties, you can simply click the property and type a new value for the control. Some properties are more complex than others and provide drop-down lists or special dialog boxes to set the property’s value. Most of the editors provided for setting property values are fairly self-explanatory, so they are not described in detail here.
In addition to using the Properties window to set a single control’s properties one at a time, you can quickly set property values for groups of controls in a couple of ways. The following sections describe some of the most useful of these techniques.
If you select a group of controls, you can sometimes use the Properties window to give all of the controls the same property value all at once. For example, suppose you select a group of TextBoxes. Then you can use the Properties window to simultaneously give them the same values for their Anchor, Text, MultiLine, Font, and other properties.
Sometimes, this even works when you select different kinds of controls at the same time. For example, if you select some TextBoxes and some Labels, you can set all of the controls’ Text properties at the same time. You cannot set the TextBoxes’ MultiLine properties, however, because the Labels do not have a MultiLine property.
Many controls display a smart tag when you select them on the designer. The smart tag looks like a little box containing a right-pointing triangle. When you click the smart tag, a small dialog box appears to let you perform common tasks for the control quickly and easily.
Figure 3-4 shows a PictureBox with the smart tag expanded. Because the smart tag’s dialog box is visible, the smart tag indicator shows a left-pointing triangle. If you click this, the dialog box disappears.
The PictureBox control’s smart tag dialog box lets you choose an image for the control, set the control’s SizeMode, or dock the control in its container. These actions set the control’s Image, SizeMode, and Dock properties.
Many controls, particularly the more complicated kinds, provide smart tags to let you perform common actions without using the Properties window.