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.

<strong>C++</strong> Class Frameworks and the Visual Component Model<br />

1. Change the Name property to PMEForm (PME for “properties, methods, and events”).<br />

2. Change the Caption property to PME Test Program.<br />

Next we need to add a memo component to the form:<br />

1. Choose the Standard tab on the Component Palette and click the Memo button.<br />

2. Click on the form to place a memo component on the form.<br />

3. Change the Name property to Memo. Be sure the memo component is selected so you<br />

don’t accidentally change the name of the form rather than the memo component.<br />

4. Double-click on the L<strong>in</strong>es property <strong>in</strong> the value column. The Str<strong>in</strong>g list editor will<br />

be displayed.<br />

5. Delete the word Memo and type A test program us<strong>in</strong>g properties, methods, and<br />

events. Click OK to close the Str<strong>in</strong>g list editor.<br />

6. Resize the memo component so that it occupies most of the form. Leave room for a<br />

button at the bottom.<br />

Your form should now look someth<strong>in</strong>g like the form shown <strong>in</strong> Figure 5.2.<br />

Figure 5.2.<br />

The form with a<br />

memo component<br />

added.<br />

Now let’s place a button on the form:<br />

1. Choose the Standard tab on the Component Palette and click the Button component<br />

button.<br />

2. Click on the form below the memo component to place the button on the form.<br />

3. Change the Name property for the button to Button.<br />

4. Change the Caption property to Show/Hide.<br />

5. Center the button on the form.<br />

<strong>14</strong>7<br />

5

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

Saved successfully!

Ooh no, something went wrong!