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.

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

8. Repeat the first seven steps to add a File Save button. Place it to the right of the<br />

File Open button. Name it FileSaveBtn and use the filesave.bmp file for the<br />

glyph.<br />

The form should now look like Figure 7.15.<br />

Figure 7.15.<br />

The ScratchPad<br />

form up to this po<strong>in</strong>t.<br />

Step 5: Add<strong>in</strong>g a Status Bar<br />

Okay, so far, so good. W<strong>in</strong>dows Notepad doesn’t have a status bar (or a speedbar, for that<br />

matter), but we’ll put one <strong>in</strong> our application (we’re cooler!):<br />

1. Click on the W<strong>in</strong>95 tab on the Component Palette and choose the StatusBar<br />

component.<br />

2. Click anywhere on the form. The status bar is automatically placed at the bottom<br />

of the form. The status bar has a default Align value of alBottom.<br />

3. Change the Name property to StatusBar.<br />

Step 6: Add<strong>in</strong>g the Memo Component<br />

We need some component <strong>in</strong> which to type text, so we’ll use a memo component (believe<br />

it or not, we’re almost done with our prototype):<br />

1. Click on the Standard tab on the Component Palette and choose a Memo component.<br />

Place the memo anywhere on the client area of the form.<br />

2. Change the Name property to Memo.<br />

3. Change the WordWrap property to True (if necessary).<br />

4. Double-click the Value column next to the L<strong>in</strong>es property. The Str<strong>in</strong>g List Editor<br />

is displayed. Delete the word Memo and click OK.<br />

5. Change the Scrollbar property to ssVertical. (Initially, we only want a vertical<br />

scrollbar on the memo.)<br />

241<br />

7

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

Saved successfully!

Ooh no, something went wrong!