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.

276 Day 8<br />

Figure 8.1.<br />

The Color dialog box.<br />

Most of the time you will probably choose a color from the list of color values provided. When<br />

you click the drop-down button to display the list of possible values, you will see what<br />

essentially amounts to two groups of values. The first group of colors beg<strong>in</strong>s with clBlack and<br />

ends with clWhite. These are the <strong>C++</strong>Builder predef<strong>in</strong>ed colors; this list represents the most<br />

commonly used colors. To choose one of the listed colors, simply click on the color <strong>in</strong> the<br />

list. If you can’t f<strong>in</strong>d a color <strong>in</strong> the list that suits your needs, you can <strong>in</strong>voke the Color dialog<br />

box, as discussed.<br />

The second group of colors <strong>in</strong> the list beg<strong>in</strong>s with clScrollBar. This group of colors<br />

represents the W<strong>in</strong>dows system colors. If you use colors from this list, your application will<br />

automatically adjust its colors when the user changes color schemes <strong>in</strong> W<strong>in</strong>dows. If you want<br />

your application to follow the color scheme the user has chosen for his or her system, you<br />

should choose colors from this list rather than from the first list.<br />

Use of color should be carefully considered. Proper use of color provides an aesthetically<br />

pleas<strong>in</strong>g environment for the user. Abuse of color makes for an obnoxious application that<br />

is annoy<strong>in</strong>g to use. Color is like a magnet to new programmers. It is common to want to throw<br />

lots of colors on a form because it’s fun and easy, but don’t get caught up <strong>in</strong> the fun at the<br />

expense of your users.<br />

HOUSE RULES: COLORS<br />

■ Use color for accent and emphasis.<br />

■ Don’t use loud colors that are hard on the eyes.<br />

■ Use the system colors <strong>in</strong> your application where appropriate. If the user changes<br />

color schemes, your application will follow suit.<br />

■ Be consistent <strong>in</strong> your use of colors across your forms.

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

Saved successfully!

Ooh no, something went wrong!