:
Component Name : tbl2HTML
:
Component Author : Cal Evans
: cal.evans@jjmusic.com
:
Copyright : (c) 1996 Cal Evans
: All Rights Reserved
: This version is Shareware. You may use it for
: 30 days. After that please either purchase it
: or remove it from your system.
:
Version : 1.0
:
Description : Creates an HTML 3.0 TABLE from a TTable.
: The Shareware version is limited to 10 rows.
:
Properties : Non-HTML properties
: ===================
: InputTable - The name of the TTable to process. The usual
: Drop-down of the current TTables on the current
: form.
:
: OutputFile - The name of the file to export the
to
:
: HTML Properties - Check out a good HTML reffernece for
: details on each of these properties of
: the tag.
: =============================================================
: Align
: Background (IE 3.x specific)
: BGColor
: Border
: BorderColor
: BorderColorDark
: BorderColorLight
: CellPadding
: CellSpacing
: Clear
: Cols
: Frame (IE 3.x specific)
: ID
: NoWrap
: Rules (IE 3.x specific)
:
Methods : Create(AOwner: TComponent)
: Destroy
: Execute - Converts the TTable to HTML
:
Events : PreExecute - Executes before the convert begins.
: If you want to add something to the
: output before it is processed then
: add it here.
:
: PostExecute - Executes after the convert. If you want to
: add to the output after the conversion but
: before the SaveToFile or you want to
: post-process the output then do it here.
:
Warning : Delphi and HTML treat Hex numbers differently.
:
: HTML expects: RRGGBB
: Delphi's IntToHex outputs: BBGGRR
:
: If you are using the property editor (double click on any
: of the color properties and the color editor pops up), it
: converts it properly. If you are changing the property by
: simply typing in the value, you have to make sure you put in
: in right. If you are changing them programatically, you can
: put the 2 functions at the bottom of this file in your code
: to do the conversion.
:
-=-=-=-=-=-=-=-=-:-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Ordering : $10US Per Developer
Information : $50US Source code
: $100US Company Wide site license (Includes source code)
:
: To purchase, send check or M.O. $10US to
:
: Cal Evans
: 5604 McLean Ct
: Virginia Beach, VA 23464
:
: Make sure you include your email address.
:
: Purchasing the full version gets you:
: * A full working copy with no limitations.
: * The latest version emailed to you
: * Free MINOR upgrades
: (The integer portion of the version number does not change)
: * The right to tech support via email.
: * The privilege of requesting new features.
: * The right to gripe about existing features/bugs.
: * A personal email from me thanking you for supporting
: my work.
:
:==================================================================
Special Offer : I will give a full version, unlimited developer, site license
Special Offer : with source code to any company who will seriously interview me
Special Offer : for a position of Lead Developer or higher.
Special Offer : (Serious is usually defined as an on-site interview at your
: expense.)
:==================================================================
Version History :
1.0 : Initial Release
:
HTML Color Conversion routines:
function ColorToRGB(ColorValue:Integer):string;
var
Work :string;
begin
Work := IntToHex(ColorValue,6);
Result := '$'+Copy(Work,5,2)+Copy(Work,3,2)+Copy(Work,1,2);
end;
function RGBToColor(RGBValue:string):integer;
var
work:Integer;
begin
If RGBValue[1] = '$' then
RGBValue := Copy(RGBValue,2,Length(RGBValue));
Result := StrToInt('$'+Copy(RGBValue,5,2)+Copy(RGBValue,3,2)+Copy(RGBValue,1,2));
end;