TFrameBrowser Demo
Internet Component Suite - ICS V8
www.pbear.com/
or
github.com/BerndGabriel/HtmlViewer
file:///
followed by the filename.res:///page0.htm
.
The HTML Component set consists of the THtmlViewer, TFrameViewer, and TFrameBrowser components. All three are HTML document display components:
THtmlViewer | The basic component. THtmlViewer displays single (non-frame)
documents. It forms the basis for the other two components. |
|
---|---|---|
TFrameViewer | Displays both Frame and single HTML documents. TFrameViewer is
oriented more for local disk file use. |
|
TFrameBrowser | Also displays Frame and single HTML documents. However, TFrameBrower is
oriented toward Internet style protocols and URL usage. Additional
code and/or components are generally required to use TFrameBrowser. |
The FrameBrowserId demo program illustrates how the TFrameBrowser component might be used in a complete application.
The demo program supports the following protocols:
http | Internet online protocol |
https | Internet online SSL protocol (optional) |
---|---|---|
file | Internet local file protocol |
|
res | Specail protocol to read HTML documents from an application's resources |
When initially loading an HTML document, the full URL including the protocol should be used. From that point on, TFrameBrowser is capable of adding the protocol and path to partial URLs found in the document.
The http, https, and file protocols supported by the demo program are standard. URLs using these protocols are in the form:
http://www.pbear.com/index.html file:///c|/thtml4/framedem.htm
The res protocol may be used to access HTML documents and their images stored in a program's resources. URLs with the res protocol have the form:
res:///helpinfo.html
The res protocol supports document extensions of HTM, HTML, GIF, JPG, JPEG,
PNG, BMP, CSS,
and TXT
. See Adding HTML Documents
to an Application's Resources for
information on how to add HTML resources to an application.
Additional special protocols may be easily added by the programmer. Protocols might be defined for reading encrypted files or reading HTML from a database, for instance. See Adding Your Own Protocols.