If you're especially lazy and want something else to do all the work, try
using an imagelist
(I'm assuming your four little bitmaps are the sime size and shape)
The in your OnDrawCell event you can use
ImageList.Draw( Canvas, Rect.Left, Rect.Top, ImageIndex )
Be sure to set your imagelist masked property to true.
Image index is of course the thing you use to pick which of the images is
drawn.
----- Original Message -----
From: "Luke Pascoe" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Friday, December 01, 2000 3:30 PM
Subject: [DUG]: Bitmap transparency
> An easy one for a friday afternoon...
>
> I've got 4 little bitmaps, each with a transparent reqion defined by the
> color pink.
> I also have a string grid which I draw manually. I want to copy these
little
> bitmaps to certian cells at will, which is easy with copyrect _except_
that
> I don't know how to make the transparent bits transparent.
>
> Any guru's out there still functioning mentally or has everyone (including
> myself) shut down for the weekend already?
>
> --
>
> Luke Pascoe
> Programming
> Ihug
> [EMAIL PROTECTED]
> 0800 GET IHUG ext.9764
>
> Give a man a fish and you feed him for a day.
> Teach him to use the Net and he won't bother you for weeks.
>
> --
>
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"