Selecting a Form or a Single Control

Top of page

Click select

To select a Form, right click the mouse on the form caption. The form form will show black square that are called selection handles (3) around the form on the right, bottom and bottom-right corners. The handles are used to indicate that the form is selected, these handles are also used to size the form.

To select a control, right click the mouse on a control to select the object. The selected control will show black square that are called selection handles (8) around the control on the top-left, top, top-right, left, right, bottom-left, bottom and bottom-right corners. The handles are used to indicate that the control is selected, these handles are also used to size the control.

Shift-drag select (Marquee Selection)

 

Press the SHIFT key and mouse to draw a marquee completely around the control you wish to select. When you release the shift key, all objects completely inside the marquee are selected.

Alternatively, you can use the TAB key to move from control to control. Once you have landed on the control you want, you can use the arrow keys to nudge it from place to place on the form. You can use SHIFT plus the arrow keys to size the control in any dimension.


Selecting Multiple Controls

Top of page

Shift-drag select (Marquee Selection)

 

Hold the SHIFT key down, click and drag the mouse to completely enclose the objects you wish to select.

Rad2 would not be selected in the example to the left, because it is not completely enclosed by the marquee.

Note: By default, the dominant control becomes the control with the smallest tab order number when using a marquee selection method (see tab order below).

Shift-click select

 

Hold the shift key down and click on each control you wish to select.

The last control clicked becomes the dominant control.


Sizing a Form or a Control

Top of page

To size the form, Click on the form caption or background area. The form will be selected and the selection handles (black boxes around a form or a control) on the right, bottom and on the bottom right will show. Move the mouse above one of the selection handles and press the mouse button down to the direction you like to size and release the button. Pressing on the SHIFT key while sizing the form will override anchored controls fixed distance from the from edge  - allowing you to size the from without moving or sizing the anchored controls (v8).


To size a control, Click on the control you wish to size, hover the mouse over one of the selection handles (8), press mouse down and move it to the direction you like to size, release the mouse button to size.


 

Tab Order

Top of page

The tab order of controls are initially set to the order in which controls are added to the form.

Clicking the Tab Order icon toggles between tab order displayed (shown above) and tab order hidden.

The tab order determines which item:

 Changing the tab order is described in the topic Form Design Tools.


 

Dominant Control

Top of page

When multiple controls are selected, one of the controls becomes the dominant object, the control that will determine how the other controls are affected by a form design tool. Consider the following example.

 

The properties of four radio buttons are to be modified. One of the objects will become the dominant object.

All four radio buttons are selected and rad1 is the dominant control.

Moving Rad1 will apply the same motion to all selected controls.

The width of rad2, rad3, and rad4 are all set to the width of rad1—the dominant control.


 

Moving Control (s)

Top of page

Select the control or controls you wish to move (see earlier section). Click on the dominant control and drag it. All the controls will be moved maintaining the same space between them.

You can also use the keyboard arrows keys to move the control (s). When dragging the control (s) with the mouse you can only drag within the form margins unless the SHIFT key is pressed down while moving the controls (v8).


 

Copying Control (s)

Top of page

Select the control or controls you wish to copy (see earlier section). Click on the dominant control and drag it while the CTRL key is pressed down. Release the mouse, the controls selected will be duplicated. When dragging the control (s) with the mouse you can only drag within the form margins unless the SHIFT+CTRL keys are pressed down while coping the controls (v8).

You can also use Copy-Paste to duplicate controls from this or another form. Select the control or controls, press copy and select paste from the edit menu.


 

Assigning a Keyboard Shortcut

Top of page

Shortcuts provide a quick keyboard selection of form controls; they allow you to operate a form from the keyboard.

 

Three keyboard shortcuts have been added to the from on the right. ALT+N selects On, ALT+F selects Off, and ALT+Q selects Quit. The shortcuts are identified by the underlined characters (n, f, and Q).

To add a shortcut to a control, use the & (ampersand character) as part of the caption name in the Properties window.

"&Quit" as a caption, translates to "Quit" on the form and the keyboard shortcut ALT+Q is assigned to the Quit button. The form above also used captions of "O&n" for the On radio button and "Of&f" for the Off radio button.


 

Moving Focus to Controls Using the Keyboard

Top of page

In design time, you can move the focus between controls using the TAB key. Another way to select control is to select the control from the view Controls drop down list.

In run-time, There are two ways of moving the focus to different controls on the form using the keyboard:

1. Shortcut Keys

Shortcuts embedded in form controls' captions allow you to go directly to a given form control using the keyboard. For example, a button with the shortcut Quit allows you to press ALT+Q to go directly to the button.

2. The TAB key.

The second way of moving the focus is with the TAB key. The TAB key will take you to each of the controls on the form in the order dictated by the form's tab order.

You can use keyboard shortcuts to control some controls while they have focus. The spacebar will turn radio buttons in a group on and off, and turn a button or switch on and off. The arrow keys will move to different selections in a combo box or list box. Some controls can only be controlled via the mouse, for example, the slider control. Some controls can never get focus: these include the group box, image control, timer control, and label control.