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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

NOTE<br />

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

component). Be sure to set the first and last components where you want<br />

them before choos<strong>in</strong>g the Space Equally Vertically alignment option.<br />

This is true of the Space Equally Horizontally alignment option as well.<br />

The Center Horizontally <strong>in</strong> W<strong>in</strong>dow and Center Vertically <strong>in</strong> W<strong>in</strong>dow alignment options<br />

do exactly as their names <strong>in</strong>dicate. These options are convenient for center<strong>in</strong>g a s<strong>in</strong>gle control,<br />

such as a button, on the form or for center<strong>in</strong>g a group of controls. As long as you still have<br />

the group of buttons selected, click both the Center Horizontally <strong>in</strong> W<strong>in</strong>dow and Center<br />

Vertically <strong>in</strong> W<strong>in</strong>dow buttons on the Alignment Palette. The buttons will be centered on the<br />

form both vertically and horizontally.<br />

When you have a group of controls selected and you click one of the<br />

center<strong>in</strong>g buttons, the controls will be treated as a group. If you were to<br />

choose each control <strong>in</strong>dividually and center it both horizontally and<br />

vertically on the form, all the controls would be stacked on top of one<br />

another <strong>in</strong> the middle of the form. By select<strong>in</strong>g the group and then<br />

center<strong>in</strong>g, you will get the entire group centered as you <strong>in</strong>tended.<br />

The form should now look like the one <strong>in</strong> Figure 7.13.<br />

Figure 7.13.<br />

The form with the<br />

buttons centered.<br />

NOTE<br />

The two w<strong>in</strong>dow-center<strong>in</strong>g alignment options can be used to align<br />

components that are conta<strong>in</strong>ed with<strong>in</strong> other components, such as<br />

buttons on a panel. The components will be centered horizontally<br />

or vertically on their parent component whether the parent is a panel<br />

or a form.<br />

235<br />

7

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

Saved successfully!

Ooh no, something went wrong!