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.

NOTE<br />

TIP<br />

TIP<br />

Work<strong>in</strong>g with the Form Designer and the Menu Designer<br />

You cannot move a group of components if components <strong>in</strong> the group<br />

have different parent controls. For <strong>in</strong>stance, let’s say you had selected<br />

both a Button component on the ma<strong>in</strong> form and a SpeedButton on a<br />

panel. S<strong>in</strong>ce these two components have different parent controls, you<br />

cannot move them as a group.<br />

Once you have a control selected, you can nudge the control by<br />

hold<strong>in</strong>g down the Ctrl key while us<strong>in</strong>g the arrow keys on the keyboard.<br />

This allows you to move the control one pixel at a time. This technique<br />

works for both groups of controls and <strong>in</strong>dividual controls. The Snap to<br />

Grid feature is overridden when you use this technique.<br />

After you have moved a component us<strong>in</strong>g this method, the component<br />

is no longer on a grid po<strong>in</strong>t—it is offset by some amount. If you now<br />

drag the component, it will ma<strong>in</strong>ta<strong>in</strong> its offset from the grid po<strong>in</strong>t as<br />

you drag.<br />

If you have moved a control us<strong>in</strong>g the Ctrl+arrow method and want to<br />

aga<strong>in</strong> align it to the grid, choose Edit | Align to Grid from the ma<strong>in</strong><br />

menu or choose Align to Grid from the local menu. The control’s topleft<br />

corner will snap to the nearest grid po<strong>in</strong>t.<br />

A control cannot be dragged outside its parent. If you drag a component off the left or top<br />

edge of the form, you will see that the component is clipped at the edge of the form. If,<br />

however, you drag the component off the right or bottom of the form and drop it, scrollbars<br />

will appear on the form to allow you to scroll to see the rest of the form. The Width and Height<br />

properties of the form are not altered. If you drag the component back onto the visible part<br />

of the form, the scrollbars disappear aga<strong>in</strong>. This is the default behavior and will occur unless<br />

you change the AutoScroll property of the form to False. Figure 7.5 shows a Memo component<br />

that has been dragged partially off the left edge of the form. Notice the scrollbar that appears<br />

at the bottom of the form.<br />

227<br />

7

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

Saved successfully!

Ooh no, something went wrong!