- - * - WhiteUnicorn - * - -




* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >


Frequently Asked Questions

Setting a transaprent background color for TImageList

Question:

How do I set the transparent color in an TImageList so the background color doesn't show?

Answer:

Use the TImageList.AddMasked(Bitmap: TBitmap; MaskColor: TColor)
method. You can either pass the transparent color yourself in 
the second parameter or clDefault to let the imagelist take the 
bottom-left pixel's color.  TSpeedButton and TBitBtn use this 
method.  Check-out buttons.pas (around line 560) to see an 
example.



* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >



- - * - Anastasija aka WhiteUnicorn - * - - LJLiveJournal
PFPhotoFile