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.

302 Day 8<br />

Figure 8.6.<br />

The predef<strong>in</strong>ed<br />

BitBtn types.<br />

The Marg<strong>in</strong> Property<br />

The Marg<strong>in</strong> property specifies the marg<strong>in</strong> between the glyph and the edge of the button<br />

(which edge this property affects is determ<strong>in</strong>ed by the value of the Layout property). The<br />

default is -1, which centers the glyph and the text <strong>in</strong> the button. Enter any positive value to<br />

set an absolute marg<strong>in</strong> (<strong>in</strong> pixels).<br />

The NumGlyphs Property<br />

The NumGlyphs property specifies the number of glyphs you have <strong>in</strong> your bitmap strip for a<br />

particular button. You can supply from one to four glyphs, as mentioned. The glyphs must<br />

appear <strong>in</strong> the bitmap strip <strong>in</strong> this order: Up, Disabled, Down, Stay Down.<br />

The Spac<strong>in</strong>g Property<br />

The Spac<strong>in</strong>g property controls the distance, <strong>in</strong> pixels, between the glyph and the button’s<br />

text. The default value is 4 pixels.<br />

The SpeedButton Component<br />

The SpeedButton component was designed to be used on speedbars. It is different from the<br />

Button and BitBtn components <strong>in</strong> that it is not a w<strong>in</strong>dowed component. This means that a<br />

speed button cannot receive <strong>in</strong>put focus and cannot be tabbed to. On the other hand, the<br />

SpeedButton component has several th<strong>in</strong>gs <strong>in</strong> common with the BitBtn component. The way<br />

<strong>in</strong> which the Glyph property is handled by the SpeedButton component is exactly the same<br />

as with the BitBtn component, so I’m not go<strong>in</strong>g to go over that ground aga<strong>in</strong>. There are a<br />

couple major differences, though, so let’s go over those.<br />

By default, speed buttons are square and are 25×25 pixels. Your speed buttons may be any<br />

size you like and can conta<strong>in</strong> text, although typically speed buttons do not conta<strong>in</strong> text. There<br />

are some properties specific to speed buttons that you should be aware of, which I’ve broken<br />

down <strong>in</strong> the follow<strong>in</strong>g sections.

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

Saved successfully!

Ooh no, something went wrong!