Things You Should Know
TFrameViewer, ThtmlViewer, and TFrameBrowser
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 also 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. |
If you know that your appication will not be using Frames, you can save a fair amount of code overhead by using ThtmlViewer rather than one of the Frame components. Many operations are also simpler using ThtmlViewer.
Starting with version 9.4, the HTML Components will use the GDIPLUS.DLL
for displaying
PNG images if that DLL is present. This will allow proper rendering of PNG images with
Alpha transparency. If the GDIPLUS.DLL
is not present, PNG images will still be displayed
but without the Alpha transparency capability.
The GDIPLUS.DLL
is present on all WinXP systems and has often been loaded on other systems
by other applications. If it is not present on your system, it can be downloaded
(at no charge) here.
Version 9.45 Compile Time Options
Version 9.45 has several possible compile time options controlled by defining symbols. You can find these in the
HTMLCONS.INC
file. None of these symbols are initially defined. To make any one (or all) of these
symbols active, remove the "." from the {$.Define XXXX}
sequence and recompile the
code.
The possibilities are:
NoOldPNG
Defining NoOldPNG removes the backup PNG Image code. This option
should not be used unless it is certain that the GDIPLUS.DLL
is present or if PNG image
capabilies are not required.
NoGDIPlus
The gdiplus.dll provides alpha transparency support for PNG images. If, for some reason the use of the gdiplus.dll is undesirable, define NoGDIPlus
NoTabLink
Defining NoTabLink disables the ability to Tab between Links. This may be desirable for documents with a great many links.
Quirk
Defining Quirk makes changes which simulate some of the quirks of other browsers. It may be desirable to define this constant if you expect to be displaying HTML which might depend on these quirks. Currently, Quirk forces the font color and size to return to default values in each table cell.
UseTNT or UseElpack
Defining one of these allows the Unicode TNT or Elpack controls to be substituted for Delphi controls for Form controls. See the file, htmlcons.inc, for more details.
NoMetafile
Metafiles may be displayed by undefining this constant. NoMetaFile is defined by default to emphasize the fact that Metafile display and some printing operations are currently incompatible in Win98. For applications where printing is unimportant or Win98/95/ME need not be supported, undefining this constant will allow Metafiles to be displayed.
Without this definition, the <select> form controls (TListbox and TCombobox) will issue the OnObjectChange event only when the control loses the focus which is according to HTML specs. Defining OpOnChange simulates the way IExplorer does it, issuing the OnChange event immediately when a change is made.
A Mouseover Image is one that changes when the mouse passes over it. The HTML components use a special syntax to implement mouseover images. It's done with the <img> tag as follows:
With the Active attribute, the GIF will normally just display the first frame. When the mouse passes over, it will display the second frame and when left clicked will show the third frame. If there are more than 3 frames, the GIF will animate when the mouse passes over.
Printing Table Headers and Footers
Starting with Version 9.3, <thead>, <tbody>, and <tfoot> are supported when printing with some restrictions. In a table definition, these tags define header, body, and footer sections of the table. If the table is split between pages when printing, the table portion on each page will have its own header and footer section.
For best results, note the following hints and restrictions.
tr {page-break-inside: avoid;}
to avoid splitting rows at page boundaries.