lazarus-ccr/components/thtmlport/things.htm
2009-11-08 22:47:15 +00:00

160 lines
7.3 KiB
HTML

<HTML>
<HEAD>
<TITLE>Things You Should Know</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="demo.css">
<STYLE TYPE="text/css"> <!--
.indent1 {Margin-left: 35px;}
-->
</STYLE>
</HEAD>
<BODY CLASS="indent">
<P CLASS="title">Things You Should Know</P>
<TABLE ALIGN="center" BORDER="0">
<TR>
<TD> <UL>
<LI><A HREF="#Difference">TFrameViewer, ThtmlViewer, and TFrameBrowser</A> </LI>
<LI><A HREF="#PNGSupport">PNG Image Support</A></LI>
<LI><A HREF="#CompileOptions">Version 9.45 Compile Time Options</A> </LI>
<LI><A HREF="#ActiveImages">Mouseover Images</A> </LI>
<LI><A HREF="#HeadFoot">Printing Table Headers and Footers</A>
</UL>
</TD>
<TD WIDTH="30">&nbsp;</TD>
</TR>
</TABLE>
<p CLASS="heading"><A NAME="Difference">TFrameViewer, ThtmlViewer, and TFrameBrowser</A></p>
<P>The HTML component set consists of the <B>ThtmlViewer</B>, <B>TFrameViewer</B>, and <B>TFrameBrowser</B>
components. All three are HTML document display components:</P>
<TABLE WIDTH="100%" CELLSPACING="2" CELLPADDING="2" BORDER="0">
<TR>
<TH WIDTH="2%"></TH>
<TH CLASS="maroon" VALIGN="top" ALIGN="left">ThtmlViewer</TH>
<TD VALIGN="top">The basic component. <B>ThtmlViewer</B> displays single (non-frame) documents. It also forms
the basis for the other two components.<BR>
<BR>
</TD>
</TR>
<TR>
<TD></TD>
<TH CLASS="maroon" VALIGN="top" ALIGN="left">TFrameViewer</TH>
<TD VALIGN="top">Displays both Frame and single HTML documents. <B>TFrameViewer</B> is oriented more for local
disk file use.<BR>
<BR>
</TD>
</TR>
<TR>
<TH></TH>
<TH CLASS="maroon" VALIGN="top" ALIGN="left">TFrameBrowser&nbsp;&nbsp;&nbsp;</TH>
<TD VALIGN="top">Also displays Frame and single HTML documents. However, <B>TFrameBrower</B> is oriented
toward Internet style protocols and URL usage. Additional code and/or components are generally required to use
<B>TFrameBrowser</B>.<BR>
</TD>
</TR>
</TABLE>
<P> If you know that your appication will not be using Frames, you can save a fair amount of code overhead by
using <B>ThtmlViewer</B> rather than one of the Frame components. Many operations are also simpler using
<B>ThtmlViewer</B>. </P>
<p CLASS="heading"><A NAME="PNGSupport">PNG Image Support</A></p>
<p>Starting with version 9.4, the HTML Components will use the <code>GDIPLUS.DLL</code> for displaying
PNG images if that DLL is present. This will allow proper rendering of PNG images with
Alpha transparency. If the <code>GDIPLUS.DLL</code> is not present, PNG images will still be displayed
but without the Alpha transparency capability.
<p>The <code>GDIPLUS.DLL</code> 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) <a href="http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en">here</a>.
<p CLASS="heading"><A NAME="CompileOptions">Version 9.45 Compile Time Options</A></p>
<P>Version 9.45 has several possible compile time options controlled by defining symbols. You can find these in the
<CODE>HTMLCONS.INC</CODE> file. None of these symbols are initially defined. To make any one (or all) of these
symbols active, remove the &quot;<B>.</B>&quot; from the <CODE>{$.Define XXXX}</CODE> sequence and recompile the
code. </P>
<P> The possibilities are: </P>
<P CLASS="maroon">NoOldPNG</P>
<P CLASS="indent1">Defining <B>NoOldPNG</B> removes the backup PNG Image code. This option
should not be used unless it is certain that the <code>GDIPLUS.DLL</code> is present or if PNG image
capabilies are not required.
</B></P>
<P CLASS="maroon">NoGDIPlus</P>
<P CLASS="indent1">The gdiplus.dll provides alpha transparency support for
PNG images. If, for some reason the use of the gdiplus.dll is
undesirable, define <b>NoGDIPlus</b>
</B></P>
<P CLASS="maroon">NoTabLink</P>
<P CLASS="indent1">Defining <B>NoTabLink</B> disables the ability to Tab between
Links. This may be desirable for documents with a great many links.
</B></P>
<P CLASS="maroon">Quirk</P>
<P CLASS="indent1">Defining <B>Quirk</B> 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, <B>Quirk</B> forces the font color and size to return to default
values in each table cell.
</B></P>
<P CLASS="maroon">UseTNT or UseElpack</P>
<P CLASS="indent1">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.
</B></P>
<P CLASS="maroon">NoMetafile</P>
<P CLASS="indent1">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.
</B></P>
<P CLASS="maroon"><a name="OpOnChange">OpOnChange</a></P>
<P CLASS="indent1">Without this definition, the &lt;select&gt; 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.
</B></P>
<p CLASS="heading"><A NAME="ActiveImages">Mouseover Images</A></p>
<P>A<I><B> Mouseover Image</B></I> 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 <B>&lt;img&gt;</B> tag as follows: </P>
<UL>
<LI>the <B>SRC=&quot;...&quot;</B> attribute should specify an animated GIF image </LI>
<LI>Add an <B>Active</B> attribute </LI>
</UL>
<P> With the <B>Active</B> 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. </P>
<p CLASS="heading"><A NAME="HeadFoot">Printing Table Headers and Footers</A></p>
<P>Starting with Version 9.3, <B>&lt;thead&gt;</B>, <B>&lt;tbody&gt;</B>, and <B>&lt;tfoot&gt;</B>
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.</p>
<p>For best results, note the following hints and restrictions.
<ul>
<li>Only the outer table will have headers and footers. Nested tables are
unaffected.
<li>When practical, use the style
<p style="margin:5; margin-left: 30;">
<code>tr&nbsp;&nbsp;&nbsp;{page-break-inside: avoid;}</code></p>
<p style="margin-top:5;">to avoid splitting rows at page boundaries.
<li>Table are pieced together when printing. Avoid table background
images which may not match between sections. Table background colors are
unaffected.
<li>When using Print Preview to inspect page layout, use the 100% magnification
setting for best accuracy.
</ul>
</BODY>
</HTML>