Hi, I have a transparency problem when I try to display a bitmap stored in a TImagList. The bitmap I want to display is a green arrow with a white background. I want to display it without transparency. With the code below the bitmap is displayed but the background is not white (it's a copy of a part of the screen). If I uncomment the 2 lines with the fillrect, the background is set to green.
Any ideas? >-------------------------------------------------------------------------------------------------------- > procedure TImgList.Paint; var Bitmap: TBitmap; begin Bitmap := TBitmap.Create; try Bitmap.Height := pHeight; Bitmap.Width := pWidth; TImgListItem(ListImg.Items[index]).ImgList.GetBitmap(tagv,Bitmap); //the image is a green arrow with a white background Bitmap.Transparent:=False; //Canvas.Brush.Color := clGreen; If I uncomment this part the background is set to green //Canvas.FillRect(0,0,pwidth,pheight); Canvas.Draw(0, 0, Bitmap); finally Bitmap.Free; end; inherited Paint; end; Regards. -- Pierre Delore http://datalinkwristapps.free.fr http://dpsite.free.fr
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
