12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

224 Day 7<br />

Multiple Selection by Dragg<strong>in</strong>g<br />

You can select multiple controls by dragg<strong>in</strong>g a bound<strong>in</strong>g rectangle around the controls to be<br />

selected. The bound<strong>in</strong>g rectangle is a dashed (or is it dotted?) gray rectangle that changes size<br />

as you drag. In fact, you don’t have to drag the bound<strong>in</strong>g rectangle completely around the<br />

components. You only have to touch a component with the bound<strong>in</strong>g rectangle <strong>in</strong> order for<br />

it to be <strong>in</strong>cluded <strong>in</strong> the selection.<br />

Be sure that you start by plac<strong>in</strong>g the mouse cursor over the background of the form and not<br />

on a component. Hold the primary mouse button down and beg<strong>in</strong> dragg<strong>in</strong>g. You will see the<br />

bound<strong>in</strong>g rectangle as you drag. Surround or touch the components you want selected and<br />

release the mouse button. Any components that were <strong>in</strong>side the bound<strong>in</strong>g rectangle (or<br />

touch<strong>in</strong>g it) are <strong>in</strong>cluded <strong>in</strong> the selection.<br />

When you have a group of controls selected, you can use the Shift+click technique expla<strong>in</strong>ed<br />

<strong>in</strong> the previous section to add other controls from the selection or to remove controls from<br />

the selection. For example, you might want to select all controls <strong>in</strong> one area of your<br />

form except for one. Surround the controls and then deselect the control you want to<br />

exclude from the selection.<br />

Go back to the form with the three buttons you created earlier (if you’ve already discarded<br />

that form, create a new one and place three buttons on it). Start at the top-left corner and drag<br />

down and to the right to surround the buttons. Let go of the mouse button, and the controls<br />

will be selected. Figure 7.3 shows the form and the bound<strong>in</strong>g rectangle be<strong>in</strong>g dragged.<br />

Figure 7.3.<br />

Controls be<strong>in</strong>g selected<br />

by dragg<strong>in</strong>g.<br />

TIP<br />

You can use Shift+drag to select non-adjacent groups of controls. If, for<br />

<strong>in</strong>stance, you had two separate groups of controls <strong>in</strong> separate areas on<br />

your form, you could drag around the first set of controls and then<br />

hold the Shift key down and drag around the second set of controls.<br />

Both groups of controls will be selected.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!