Board index » delphi » PlEaSe HeLp Me !!!!!!!!!!!!!! How to set a bsClear drawn bitmap in a ListBox...

PlEaSe HeLp Me !!!!!!!!!!!!!! How to set a bsClear drawn bitmap in a ListBox...

I use an ownerDrawnvariable ListBox. I insert some icons (in fact, I
use little bitmap of 12x12) for the listBox like in Winfile. My
question is : one of my bitmaps is a circle and I want to set all what
is not in the circle transparent. How Can I do that ?

Thanx for any clue

Fabio

 

Re:PlEaSe HeLp Me !!!!!!!!!!!!!! How to set a bsClear drawn bitmap in a ListBox...


Quote
On Tue, 01 Oct 1996 18:17:26 GMT, u117...@vm1.ulg.ac.be (SID) wrote:
>I use an ownerDrawnvariable ListBox. I insert some icons (in fact, I
>use little bitmap of 12x12) for the listBox like in Winfile. My
>question is : one of my bitmaps is a circle and I want to set all what
>is not in the circle transparent. How Can I do that ?

>Thanx for any clue

>Fabio

        if FTransparentBMP then
        begin
          BitmapRect := Bounds(0, 0, Width, Height);

          FCanvas.BrushCopy(DrawRect, ABitmap, BitmapRect,
Canvas.Pixels[0, 0]);
        end
        else
          FCanvas.Draw(DrawRect.Left, DrawRect.Top, ABitmap);

(the colour Canvas.Pixels[0, 0] is taken as the transparent colour,
very much like the way the glyphs work).

BTW, do you have problems with your keyboard? The capitalization is a
bit strange...
--
Stefan Hoffmeister                       Stefan.Hoffmeis...@Uni-Passau.de
University of Passau, Bavaria, Germany  

Other Threads