ccGraphicButton
===============

Version 1.0a - 8/11/95
  - Corrected palette problems not noticed originally due to using a 16bit
    colour driver.
  - GBUTTON2 is virtually finished, and handles much much more.


ccGraphicButton is a Borland Delphi VCL, and allows transparent or opaque
buttons to be placed on a form.

The sample program included shows some of the uses of ccGraphicButton,
the graphics were shamelessly ripped off from Comptons Interactive
Encyclopedia (just cause they were so pretty), but numerous button graphics
exist on the internet.

To use:
	Place a ccGraphicButton on your form.
	Set the ButtonPicture property to a bitmap image.
	If you want a transparent button then set the ButtonMask property
		to a properly defined mask bitmap
	To handles palette problems either assign a palette bitmap to
		the PaletteBitmap property, or use the same palette for
		all bitmaps on a form (try to keep number of colours to
		under 200 for reliable results - Windows problem - not mine :-)
The button does not respond as a Windows button would, to enable the 
maximum possible flexibility. This does however mean that it is up to you 
to program your own code for deciding when the graphic changes, and
what it changes to.

NumberOfButtons contains the number of frames that the bitmap has.

The property CurrentButton should contain a number between 1 and
NumberOfButtons. This decides which button is showing. By writing an
event handler for OnClick, or OnDblClick you can then change the
CurrentButton as appropriate, and take whatever actions you want.

By writing the VCL in this way it makes it possible to use ccGraphicButton
as an old fashioned style button (with pretty graphics and transparency), or
as an animated button (respond to OnClick by flicking through
CurrentButton using a TTimer control.

The ButtonPicture bitmap should have black in the areas to show transparent,
and the mask bitmap should be monochrome, with white in the transparent
areas, and black in the opaque areas. Look at the sample bitmaps to see
what I mean.


Designers Notes

Although I could have written the VCL so that it didnt need a mask, I 
decided that on balance the overhead involved with a monochrome bitmap
was negligible, and increased the speed of the Paint routine by a significant
amount. If I get enough requests for this then version 2 may well include an
option for this. Remember that you do not have to use a mask if the button
is not transparent.

Also it would have been possible for me to define a sequence of animation
frames, that would be handled by the button itself (so that a single click on
the button would trigger an animated button or toggle a two-state button),
but again for simplicity and flexibility I decided to leave this for now. Again
this is a feature that may appear in version 2 should I get enough requests.


Copyright - The Source Code copyright follows.

{ccGraphicButton - A sort-of 'Shareware' VCL for Borland's Delphi

Version 1.0a - 8/11/95
  - Corrected palette problems not noticed originally due to using a 16bit
    colour driver.
  - GBUTTON2 is virtually finished, and handles much much more.

This VCL lets you create and use 'transparent buttons' and 'graphic
buttons'.

The code contained within this file is copyright Casey Charlton 1995.

You may use this code in it's entirety, without modification (including
this header), in any non-commercial project. In this case this VCL is Freeware.

Should you wish to either a) modify the code, or b) use this component,
or any modified (or descendant) version of it, then this VCL becomes
Shareware. As such I ask only that you send as much as you think that
this VCL is worth to you (a good guide would be to work out how long it
would take you to write and debug a similar component ).

Those registering will recieve version 2 (and will have a say as to what
they want in version 2) when it becomes available, and will recieve any,
and all, updates I make until then.

To arrange payment contact me at :  casey@larouss.demon.co.uk

While I fully appreciate that you may just copy segments of this code,
I might remind you that it took me many hours to write (and many more
to debug), and therefore it will be on your conscience. I have not
attempted to limit your use of this VCL in any way, so it's up to you.


I look forward to receiving large sums of money ;-)                  }



Use and enjoy.

Casey Charlton. 17/10/95
