=============================================================================
EnhComboBox, ImgComboBox Components for Delphi 4
Author: Norbert ADAMKO
e-mail: norris@frdsa.utc.sk
Copyright 1999

Version 1.5, 25 April 1999

This component is FREEWARE and comes with full source code.
However, I still hold the copyright.
If you made any modifications to the code, please send it to me.
If you like this component or have any ideas for improvement
or bug reports, don't hesitate to mail me.
=============================================================================


Short Descrition:
=================
ComboBox with flat MS Office 97 style, item images and indentation level
(exactly like ComboBoxEx from Microsoft used in Windows Explorer).
Does not use any additional forms for drop down part (resource saving),
like many other components. Inherits from Delphi's TCustomComboBox.
Great for use on toolbars and in explorer-like forms.


Components Reference:
=====================

------------------------------------------------------------------------
TEnhComboBox
------------------------------------------------------------------------

This component inherits from TCustomComboBox and introduces
few new properties, methods, events as well as Office 97 look.


* property AlwaysShowBorder: boolean;
  If set to true and Flat=true, combo has always soft border, 
  regardless of mouse position.
  Default value: false

* property AutoDropDownWidth: boolean;
  If set to true, width of the drop down list is automatically
  adjusted according to the width of items, so that all items fit the list.
  Default value: false

* property AutoHorizontalScroll: boolean;
  If set to true, horizontal list scrollbar appears automatically when needed.
  Default value: false

* property ButtonStaysPushed: boolean;
  If set to true, Combo button stays down when drop down list is visible
  (Combos in Office 97 behave like this)
  Default value: false

* property DropDownWidth: integer;
  Width in pixels of drop down list of combo. Can't be set to value
  less than width of the combo.
  Default value: Width of combo

* property ExtendedInterface: boolean;
  If set to true, down arrow drops down the list,
  if set to false F4 drops down the list and arrows move the selection in list.
  Default value: false

* property Flat: boolean;
  If set to true combo looks exactly like combos in Office 97,
  if set to false, combo has 3D border.
  Default value: true

* property HorizontalExtent: integer;
  If set to value bigger than width of the drop down list, horizontal
  scrollbar appears in drop down list.
  Default value: 0

* property ShowBorderWhenInactive: boolean;
  If set to true and mouse is over flat combo, border appears even when
  the application is not active.
  DefaultValue: false

* property ToolTip: boolean;
  If true and text in combo's editbox is wider than width of combo, hint
  is set to the editbox content. (ShowHint property must also be set to true)
  Default value: false

* property OnCloseUp: TNotifyEvent;
  This event is fired when dropdown list is closed up.


------------------------------------------------------------------------
TImgComboBox
------------------------------------------------------------------------

This component inherits from TCustomEnhComboBox and introduces
few new properties and methods. This ComboBox has abilities of Microsoft's
ComboBoxEx (as seen in Windows Explorer) common control
(I'm trying to implement ComboBoxEx - it's a lot of work. That's why I
decided to make this one.) plus all of the properties of EnhComboBox.


* property Images: TCustomImageList;
  Image list associated with ComboBox. ComboBox height is automatically set
  according to the height of images in ImageList.
  Default value: nil

* property Indent: byte;
  Number of pixels for one indent level.
  Default value: 8

* property IndentLevel[Index: integer]: byte;
  Indent level determines how far does the item appear from
  left side of the drop-down list. Every item can have different indent level.

* property ImageIndex[Index: integer]: integer;
  Index of image in ImageList for item. Image is drawn on the left side
  of Item text.

* property OverlayIndex[Index: integer]: integer;
  Index of overlay image for item. Overlay image is drawn transparently
  over item's image.

* property SelectedIndex[Index: integer]: integer;
  Index of image in ImageList which should be drawn when item is selected. 

* function AddItem(paCaption: string; paData: pointer = nil;
                   paImage: integer = -1; paIndent: byte = 0; 
	           paSelectedImage: integer = -1;
                   paOverlayImage: integer = -1): integer;

* procedure InsertItem(paIndex: integer; paCaption: string; 
                       paData: pointer = nil;
                       paImage: integer = -1; paIndent: byte = 0; 
                       paSelectedImage: integer = -1;
		       paOverlayImage: integer = -1);
  This methods simplify adding of items to the ComboBox. You can specify
  also ImageIndex and Indent level for added (or inserted) item.


NOTICE: ImgComboBox is implemented using owner drawing feature of TComboBox.
        This means that you are not able to use ComboBox style other than
        csOwnerDrawFixed. However any event handler assigned to OnDrawItem are
        active and will be called, but then you are responsible for drawing
        not only the items, but also focus rectangle.


-----------------------------------------------------------------------------

Credits:
========
EnhComboBox component partly uses ideas for drawing and a little bit
of code from Favio Ugalde's <fugalde@geocities.com> ComboBox97 Component.


-----------------------------------------------------------------------------

Known Problems:
===============

 * There are currently no *known* problems with this component.

-----------------------------------------------------------------------------

Future Enhancement:
===================

 * Windows 98 like blending of selected images


-----------------------------------------------------------------------------

Revision history:
=================
1.5 Added image overlay support
    Fixed pushed button behavior
1.4 Fixed bug with loosing ExtendedInterface, HorizontalExtent and 
    DropDownWidth values when recreating ComboBox
1.3 Added new properties: EnhComboBox.AlwaysShowBorder and 
    ImgComboBox.SelectedImage
    Fixed bug with forgotten debugging variable, which set parent's form 
    caption to its value (Oops ;-).
1.2 First public release

=============================================================================
