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.

Build<strong>in</strong>g Internet Applications<br />

property of each button to the bitmap of your choos<strong>in</strong>g. Set the Go! button’s Default<br />

property to true. This will allow the user to simply type a URL and then press Enter to jump<br />

to it. The Go! button will cause your browser to attempt to open a URL you supply, while<br />

the Home button will cause it to jump directly to your home page. I’ll show you how to<br />

specify a home page <strong>in</strong> the browser’s source code <strong>in</strong> a moment.<br />

When your buttons are <strong>in</strong> place, drop a TComboBox onto the left edge of your bottom TPanel,<br />

stretch it so that it’s as wide as possible, and then delete its Text property. You’ll use this<br />

combo box to supply Web page addresses that you want to browse. When the application<br />

runs, you’ll type a URL <strong>in</strong>to the TComboBox and click the Go! button to browse it. Figure 13.2<br />

shows what your form should look like so far.<br />

Figure 13.2.<br />

Your Web browser<br />

form with its<br />

bottom and top<br />

sections <strong>in</strong> place.<br />

Now that the top and bottom of your Web browser form are complete, let’s supply the<br />

middle. Drop a THTML component onto the form’s middle and set its Align property to<br />

alClient. This will cause it to take all the form space not already occupied by the top<br />

TTabControl or the bottom TPanel. When the form is resized, m<strong>in</strong>imized, maximized, or<br />

restored, the area of the form that renders HTML will expand or shr<strong>in</strong>k with it. Figure 13.3<br />

shows your form with all its controls <strong>in</strong> place.<br />

Figure 13.3.<br />

Your new form as it<br />

appears with all its<br />

visual controls.<br />

477<br />

13

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

Saved successfully!

Ooh no, something went wrong!