Component Name..: AC Components
File Version....: 3.1beta
File Description: New components collection
Target..........: Delphi 3.0x - 4.0x
Author Name.....: Andrea Carli
EMail...........: ctime@bin.it
File Status.....: Freeware/Shareware
Category........: Visible Components.

-------------------------------------------------------------------
////\\\\////\\\\////\\\\////\\\\////\\\\////\\\\////\\\\////\\\\///
-------------------------------------------------------------------
Solved only some D4 compiler hints & warning. Functionality is the
same as ver. 3.0.
-------------------------------------------------------------------

AC Components v3.1beta      Copyright (c) 1998-99 COMPUTER TIME snc
-------------------------------------------------------------------
Component collection for normal and data aware editing purposes.


  ATTENTION! - ATTENTION! - ATTENTION! - ATTENTION! - ATTENTION!
-------------------------------------------------------------------
| Users of AC Components 2.x must read file UPGRADE.TXT first!!!! |
-------------------------------------------------------------------


INTERNATIONAL ERROR MESSAGES
----------------------------
Italian users can translate error messages renaming file ACMISC.RIT
in ACMISC.RES.
English users can translate error messages renaming file ACMISC.REN
in ACMISC.RES (Dafault).



Components list:
----------------
TACTrayIcon       Put the mainform in the windows tray area
TACCaptionPanel   Dragging this panel moves the form in which it is situated
TACCaptionImage   Dragging this image moves the form in which it is situated
TACRollPanel      A panel that roll-down/left when mouse pass over it
TACKeyboard       Implement a keyboard for input stuff
TACMoreBtn        A SpeedButton that latch itself to an generic Edit control
TACMaskEdit       A MaskEdit control that can be connected to a button (ACMoreBtn)
TACDbEdit         A DbEdit control that can be connected to a button (ACMoreBtn)
TACDateEdit       Edit control to handle date input
TACDbDateEdit     Data aware version
TACLookupEdit     Edit control that can lookup for input values in other tables
                  using SQL statements (GREAT FOR SQL PROGRAMS!)
TACDbLookupEdit   Data aware version (GREAT FOR SQL PROGRAMS!)
TACLookupEditEx   Edit control that can lookup for input values in other tables
                  using an external Dataset (GREAT FOR SQL PROGRAMS!)
TACDbLookupEditEx Data aware version (GREAT FOR SQL PROGRAMS!)
TACMoreEdit       Edit control that had a button to handle an user defined action
TACDbMoreEdit     Data aware version

-------------------------------------------------------------------
////\\\\////\\\\////\\\\////\\\\////\\\\////\\\\////\\\\////\\\\///
-------------------------------------------------------------------


/-------------/
/ TACTRAYICON /
/-------------/
Relevant properties:

  About                : Information on component version
  Active               : Enable disable tray icon
  Enabled              : Show IconEnabled or IconDisabled
  HideForm             : Hide the form from the Windows TaskBar
  Hint                 : Hint showing passing over the icon area
  IconEnabled          : Icon for enabled state
  IconDisabled         : Icon for disabled state
  PopupMenu            : PopupMenu used for Right mouse button press
  OnClick              : Event used for click with Left mouse button
  OnDblClick           : Event used for double click with Left mouse button

This component encapsulate all the needing functions to make applications
that use the Windows tray area. Simply put one component on the main form
and run.
If the PopupMenu has a menuitem as default the double click will fire the
<MenuitemPress> event instead of the OnDblClick event.
Use only one OnClick or OnDblClick event, because the one exclude the other.



/-----------------------------------/
/ TACCAPTIONPANEL & TACCAPTIONIMAGE /
/-----------------------------------/
It act like the Caption bar of the window.
Placing it on a form make it move the form when the component is dragged with
the mouse.
Useful for Captionless windows.
Simply put on a form or another control (sorry only 3 level owner are allowed!)



/--------------/
/ TACROLLPANEL /
/--------------/
Relevant properties:

  About                : Information on component version
  RollDirection        : Direction to roll to (Horizontal or Vertical);
  RollEnabled          : Enable/Disable new features;
  RollSpeed            : Step by witch size increase;
  RollupSize           : Panel size when is rolled-up;

This component i a TPanel wich at runtime stay rolled-up assuming
the 'RollupSize' height/width and when the mouse pointer pass over
it the size increase by 'RollSpeed' units until it reach the full
original size.
If 'RollEnabled' is False the control act as a standard panel.
'RollDirection' specify if the panel should roll horizontally or
vertically.



/-------------/
/ TACKEYBOARD /
/-------------/
Relevant properties:

  Design-runtime:   KeyCaptions: TStrings;
                    KeyIndex: TKeyboardBtn; [R/O]
                    NullValue: String;

  Runtime:          Value: String;          [R/O]

  Runtime methods:  Enable ( Index: TKeyboardBtn, Value: Boolean )
                    Down   ( Index: TKeyboardBtn, Value: Boolean )

KeyIndex as KeyCaptions.Strings[index] start from 0.

Limitations: Max 30 keys (TKeyboardBtn goes from 0 to 29) may be
increased changing the source code and recompiling the component.

This component display a keyboard in wich each key had a caption
given by the 'KeyCaptions' property; setting this property make the
corresponding button visible and enabled.
Only a key remain pressed at time or none at all, in the first
case the 'Value' property (runtime) of the component is the caption
of the pressed key; otherwise is given by the 'NullValue' property.
'KeyIndex' property (runtime) represent the current button selected
(not necessarily pressed!).
Using methods 'Enable' or 'Down' you can Enable/Disable or
Press/Pull a particular key.



/------------/
/ TACMOREBTN /
/------------/
Relevant properties:

  About                : Information on component version
  FocusControl         : Control to latch to
  Latched              : Enable / Disable Latching
  LatchRunTime         : Stay latched if FocusControl moves at runtime

This component is a TSppedbutton descendant which can be latched to
a wincontrol and take a reference to the control through the
FocusControl property.



/-------------------------/
/ TACMASKEDIT & TACDBEDIT /
/-------------------------/
Relevant properties:

  About                : Information on component version
  FocusControl         : Button to push
  ShortCuts
    AddAlt             : Add 'ALT' to Shortcut Key
    AddCtrl            : Add 'CTRL' to Shortcut Key
    ShortCutKey (Word) : Key used to press the button connected

These are edit controls that have a reference to a button and can
push the button pressing a shortcut key.



/-----------------------------/
/ TACDATEEDIT & TACDBDATEEDIT /
/-----------------------------/
Relevant properties:

  About             : Information on component version
  ButtonsOptions
    ButtonTabStop   : choose if buttons are TabStop
    CanClear        : show (or hide) clear button
    CanPopup        : enable (or disable) popup calendar button
    CanValidate     : Show (or hide) validate button
    EditEnabled     : Enable/Disable editing (user can use only the buttons)
    GlyphPopup      : Select the glyph for popup button
    GlyphValidate   : Select the glyph for validate button
  Colors
    ColorArrow      : Color for arrow buttons of calendar
    ColorDates      : Color for dates of calendar
    ColorOnError    : Color when date isn't correct
    ColorTitle      : Color for title of calendar
    ColorValid      : Color for valid dates of calendar
    ColorWeekEnd    : Color for week-end dates of calendar
  DayNames          : Names of each days
  Date              : Selected date as DateTime               (RUNTIME)
  EditOptions
    EmptyAsToday    : If true (and canclear is false), empty date is "today"
    FocusOnError    : If date is invalid, keep focus or not
    IsMasked        : choose if you want to use mask-edit for input
    IsModal         : choose if you want a modal popup calendar (or not)
    PopupToday      : If true, popup calendar always start with today's date
    StartOfWeek     : First day of week
  MonthNames        : Names of each months
  ShortCuts
    AddAlt          : Add 'ALT' to Shortcut Key
    AddCtrl         : Add 'CTRL' to Shortcut Key
    KeyClear        : Shortcut key for Clear button
    KeyPopup        : Shortcut key for Popup button
    KeyValidate     : Shortcut key for Validate button
  Text              : Selected date as String                 (RUNTIME)
  DataSource, DataField : Database informations               (TACDBDATEEDIT)
  ReadOnly : Can modify field                                 (TACDBDATEEDIT)

Relevant Events
  OnAfterClick      : When a user click for select a date.
  OnValidateClick   : Used for handle Validate button press.
  OnValidate        : Used for validate an entered date.

--------------------------------------------------------------------------------
PLEASE NOTE!
--------------------------------------------------------------------------------
These are derived component from: TDateEdit97 & TDbDateEdit97 by BOURMAD Mehdi

Since BOURMAD release a new version 4.0 of this component with many changes, I
decided to rewite most parts of these components my self, so the source had
suffer great modifications from original ones, exept in the outward aspect.
The development of these components will not be tied to BOURMAD works anymore.
--------------------------------------------------------------------------------



/---------------------------------/
/ TACLOOKUPEDIT & TACDBLOOKUPEDIT /
/---------------------------------/

Relevant properties:

  About             : Information on component version
  ButtonsOptions
    ButtonTabStop   : Enable/Disable TabStop on buttons
    CanClear        : Display/Hide the Clear button
    CanPopup        : Enable/Disable the Popup button
    CanValidate     : Display/Hide the Validate button
    EditEnabled     : Enable/Disable text editing
    GlyphPopup      : Select the glyph for popup button
    GlyphValidate   : Select the glyph for validate button
  EditOptions
    CheckMethod
    ----------------
            cmNone  : Not validate the input value on exit;
           cmAlert  : Check the value enteres as per cmAlert,
                      but on negative case it beep;
       cmAlertStop  : Check the value enteres as per cmAlert,
                      but on negative case it beep and keep
                      the focus on the control;
      cmEmptyAlert  : Same as cmAlert but allow empty inputs.
  cmEmptyAlertStop  : Same as cmAlertStop but allow empty inputs.
            cmSoft  : Check if 'LookupFieldName' value is equal
                      to user input value (performing a query)
                      on exit if True control lose focus if F
                      or incomplete value it display the popup
                      dialog pointing to the near record value
                      independing from 'PopupFirst' setting;
       cmEmptySoft  : Same as cmSoft but allow empty inputs.
    ----------------
    DialogCaption   : Set the caption of the popup dialog or
                      it will be 'Browse '+ LkupTable name
    PopupFirst      : Start from first record or start from
                      the value of Text
    PopupHeight     : Lookup Form start height
    PopupWidth      : Lookup Form start width
  ShortCuts
    AddAlt          : Add 'ALT' to Shortcut Key
    AddCtrl         : Add 'CTRL' to Shortcut Key
    KeyClear        : Shortcut key for Clear button
    KeyPopup        : Shortcut key for Popup button
    KeyValidate     : Shortcut key for Validate button
  SourceOptions
    ReturnField        : Field whose value must be returned
    ReturnFieldDesc    : Field whose value must be returned as
                         description of ReturnField
    SourceDatabaseName : Name of the database the SourceTableName
                         belongs to
    SourceFieldNames   : List of fields names to display
    SourceFieldTitles  : List of Colums titles for fields
    SourceTableName    : Name of the lookup table
    SQL                : Contain sql statement after SQLCompiled is
                         set to True or to enter a free statement
    SQLCompiled        : If set to True create the SQL statement
                         the LookupDialog use.
                         Set True in the final exe (run faster)
    SQLUserDefined     : Set if SQL statement is user defined
                         (SourceFieldxxxx, SourceTableName not
                         required)
  FieldDescription     : Contain the value of SourceFieldDesc (RUNTIME-ReadOnly)

Relevant Events:

  OnAfterClick         : Raised after a button is pressed
  OnAfterPopup         : Raised after the Lookup Form is closed
  OnValidateClick      : Raised when validate button is pressed

  Hierarchy:

    TCustomMaskEdit
          |
    TACCustomLookupEdit  -- TACDbLookupEdit
          |
    TACLookupEdit

 These component are TCustomMaskEdit descendant which incorporate a
 Clear button (to clear the edit text), a Popup Button which display
 a lookup dialog to chose a value from a query dataset and a Validate
 button to make a defineable action when user press it.
 The SQL query can be created automatically by the component giving
 the necessary values: Database, Table, Fields; or be userdefined.
 Using the automatic SQL query in the lookup form user can change the
 display order simply clicking on columns captions, and can perform
 incremental search in the indexed field pressing combinations of
 keys on the grid.
 Using Userdefined SQL data will can sorted by SQL 'ORDER BY' clause
 but automatic order change is not allowed.
 CheckMethod permit to validate the value entered checking if it is
 equal to field value of the property 'ReturnField' performing a
 'SELECT * FROM SourceTableName WHERE ReturnField : Value entered'
 and performing two possible action as explained.
 IMPORTANT! At this moment field type must be 'String', it does not
 work on numeric values. Use cmNone for numeric values.



/-------------------------------------/
/ TACLOOKUPEDITEX & TACDBLOOKUPEDITEX /
/-------------------------------------/

Relevant properties:

  SAME AS TACLOOKUPEDIT & TACDBLOOKUPEDIT EXEPT FOR:

  SourceOptions
    ReturnField        : Field whose value must be returned
    ReturnFieldDesc    : Field whose value must be returned as
                         description of ReturnField
    SearchIndex        : Position of the Field to be used for
                         incremental searching in dialog
    Source             : Name of the TDataSet to list

  StartValue           : Passing a particular value to this
  (RUNTIME)              locate the value in the Dataset according
                         to the LookupFieldName value and display
                         it in the edit box

Relevant Events:

  OnAfterClick         : Raised after a button is pressed
  OnAfterPopup         : Raised after the Lookup Form is closed
  OnValidateClick      : Raised when validate button is pressed

  Hierarchy:

    TCustomMaskEdit
          |
    TACCustomLookupEditEx  -- TACDbLookupEditEX
          |
    TACLookupEditEx

 These component are TCustomMaskEdit descendant which act like a
 TACLookupEdit except they use an external dataset.
 Doing so after selecting a value the db cursor of the dataset point
 to the record selected.
 The order used to display the data must be settled in the dataset
 and cannot be changed during dialog display.
 CheckMethod is less strict validating the value, it perform only a
 locate on the dataset (be sure to have the dataset ordered by the
 LookupFieldName).
 IMPORTANT! Field type must be 'String', it does not work on numeric
 values. Use cmNone for numeric values.



/-----------------------------/
/ TACMOREEDIT & TACDBMOREEDIT /
/-----------------------------/

Relevant properties:

  About             : Information on component version
  ButtonsOptions
    ButtonTabStop   : Enable/Disable TabStop on buttons
    CanClear        : Display/Hide the Clear button
    CanValidate     : Enable/Disable the Validate button
    EditEnabled     : Enable/Disable text editing
    GlyphValidate   : Select the glyph for validate button
  ShortCuts
    AddAlt          : Add 'ALT' to Shortcut Key
    AddCtrl         : Add 'CTRL' to Shortcut Key
    KeyClear        : Shortcut key for Clear button
    KeyValidate     : Shortcut key for Validate button

Relevant Events:

  OnValidateClick   : Raised when Validate button is pressed

 These component are TCustomMaskEdit descendant which incorporate a
 Clear button (to clear the edit text) and a Validate Button to make
 a defineable action when user press it.


-------------------------------------------------------------------
////\\\\////\\\\////\\\\////\\\\////\\\\////\\\\////\\\\////\\\\///
-------------------------------------------------------------------
Dear Delphi user,

I write these components for my personale use in acconting apps, so
they may be not suitable for any kind of data and may not function
properly in any situation as you want.
I use it on Delphi 3.02 and will release a Delphi 4 version in early
october 1998.
If You experience bugs and find some improvements to make I will try
to satisfy your needs as soon as possible.
Thanks in advance to anyone will try and use these components in his
apps.
Regards,
                                             Andrea Carli

                             - : * : -

THESE COMPONENTS ARE FREEWARE, SO YOU CAN USE IT IN YOUR APPS FOR
FREE, BUT I'LL NOT GRANT YOU FOR ANY DAMAGES OR BUGS CAUSED BY THIS
SOFTWARE.

THE SOURCES FOR: TACDATEEDIT, TACDBDATEDIT WILL NOT BE INCLUDED FROM
NOW ON BECAUSE ARE INCLUDED IN THE ACEDITS UNIT TOGETHER WITH THE OTHER
EDIT COMPONENTS.

  For information, BUG REPORT and suggestions (very appreciated)
  e-mail me at:
                        ctime@bin.it

WARNING! THE CODE IS PROVIDED AS IS WITH NO GUARANTEES OF ANY KIND!
USE THIS AT YOUR OWN RISK - YOU ARE THE ONLY PERSON RESPONSIBLE FOR
ANY DAMAGE THIS CODE MAY CAUSE - YOU HAVE BEEN WARNED!
-------------------------------------------------------------------
////\\\\////\\\\////\\\\////\\\\////\\\\////\\\\////\\\\////\\\\///
-------------------------------------------------------------------

History :

03/01/1998 - Version 1.0:
  First version.


10/01/1998 - Version 2.0:
  Many modifications and property names renaming require to release a new
  version. I apologise for inconvenients on upgrading from previous version.

  FEATURES:

  - Added: TACLookupEdit, TACMoreEdit;

  - Completely rewritten TACLookupEdit, TACMoreEdit,
    TACDBLookupEdit, TACDBMoreEdit components structure, now they all inherited
    from TCustomMaskEdit, data aware version no longer inherit from TDBEdit.

  - Added new features and behaviour in TACDBDateEdit.

  - Added new features in TACLookupEdit.

  - Unfied third button 'Validate' and event 'OnValidate' and possible glyphs.

  - Other property renaming and minor changes.


22/01/1998 - Version 2.1:

  - Added: TACLookupEditEx, TACDBLookupEditEx;

  - TACLookupEdit & TACDbLookupEdit
    Added two more CheckMethods:

      cmEmptySoft : Same as cmSoft but allow empty inputs.
     cmEmptyAlert : Same as cmAlert but allow empty inputs.

  - TACKeyboard: added Flat property

  - Corrected edit scrolling to scroll when left margin (right button)
    is reached [thanks to: Ralph Friedman (TeamB)]

  - Corrected Buttons Tabstop order;

  - Other minor changes.


10/02/1998 - Version 3b:

  - Added components: TACTrayIcon, TACCaptionImage, TACCaptionPanel;

  - Subcode changes require to release a new version of these components
    that are not completely compatible with v2.1;

  - completely rewritten property handling for Buttons Options, Shortcut
    Keys and specific Component Options;

  - Other minor correction and changes.

  - Put Error string in .RES file ACMISC.RES.
    Included English & Italian strings sources (.RC)


06/08/1998 - Version 3.0 Final

  - Technical assistence and sources availables on request

  - Added components: TACRollPanel;

  - Minor internal changes on sources;


25/04/1999 - Version 3.1 Beta

  - D4 support;

  - Few corrections based on compiler warning;