Selecting Controls
Only selected controls can be moved, sized, deleted, or have their properties modified. The Designer offers several ways to select controls.
A selected control is indicated by the presence of sizing handles around its perimeter. There may be as many as eight handles but depending on the type of control and its size there may be as few as two. The color of the sizing handles may also appear differently depending on other factors. The colors used by the Designer are a follows:
1. A blue handle with a white border indicates the Primary Selected Control. Often due to the form's background color, the white border may not be clearly visible.
2. A white handle with a blue border indicates a Secondary Selected Control.
3. A red handle with a white border indicates a locked Primary Selected Control.
4. A white handle with a red border indicates a locked Secondary Selected Control.
Single Control Selection
To select a single control, simply click within the bounds of the control. Any existing sizing handles on the form will be removed and new handles will appear around the control selected. The color of the sizing handles will vary based on the state of the Lock Controls setting. If the Properties Window is visible, the clicked control will be selected in the combobox at the top of the window and the control's properties shown in the window. If the Code window is visible, the control will be selected in the Object combobox at the top of the window. If the Outline window is visible, the control will be selected in the tree.
As an alternative to selecting an control with the mouse, the user may change the currently selected control using the property or code window combobox or by clicking the object in the Outline window. These methods are particularly handy when the control is positioned off the screen or is not visible for other reasons.
Multiple Control Selection
Multiple control selection allows controls to be moved, sized, deleted, or have their properties modified as a group. The application of these changes to a group of controls speeds up the design process and promotes consistency among the controls. To select multiple controls, use one of the following methods:
1. Control Click
Method
Holding the control key while clicking within the bounds of controls will toggle their state from
being excluded in the group to being included. If no control is currently selected, the first control
clicked will become the Primary Selected Control. Subsequent controls clicked will become Secondary Selected
Controls. If the control clicked is not a member of the selected group, it will be added and the Secondary
Selected Control sizing handles drawn around the control. If the control is a member of the currently
selected group, it is removed from the group and the sizing handles removed.
2. The Lasso Method
An easy method of multiple selection is performed by drawing with the mouse. Start with the pointer
tool selected. On the design form, position to a starting point, press the mouse key down and drag to
an ending position on the form. As you drag across the form, a transparent gray box with a red border
will be shown. Upon release of the mouse button, any control touched by the selection box will become
a member of the selected controls. The control only needs to be partially contained in the box to be
included. Once complete, the Control Click method may be used to include or exclude other controls.
3. The Select All
Menu Function
All objects on a form may be selected using the Select All function on Edit or short cut (right click)
menu. Once the function is complete, the Control Click method may be used to include or exclude other
controls.
Locked Controls
Locked controls may not be moved or sized using the mouse. The keyboard arrows and the Property Window values will still move or size the selected controls. A form is locked using the Lock Controls function of the Format menu or by clicking the Lock button in the toolbar. This state simply prevents accidental changes in a form during the Designer session. It has no effect on the form when used in a program. A Behavior option allows forms to be opened with an initial state of locked.
Primary Selected Control
When using the various Format Menu functions to align or size multiple objects, the Primary Selected Control is used as a basis for the function. For example, the Align Left function would align all selected controls with the left edge of the Primary Selected Control. The Make Same Size function would change each Secondary Selected Controls to the same height and width as the Primary Selected Control.
When multiple selection is in effect, the Primary Selected Control may be changed by clicking within the bounds of the control. The clicked control will become the Primary Selected Control and the previous Primary Selected Control will become a Secondary Selected Control. The sizing handles will change colors to illustrate the change.
![]() |