Felipe Monteiro de Carvalho wrote:
On 8/9/06, Andreas Berger <[EMAIL PROTECTED]> wrote:
Can someone tell me how to load transparent glyphs for a TSpeedButton at
run time?
You are forgetting that bitmaps contain no information about
transparency at all. You must provide the transparency information
yourself. In this case it will be a color. All pixels with that color
will be transparent.
Try:
bmp := TBitmap.Create;
bmp.LoadFromFile('x.bmp');
bmp.Transparent := True;
bmp.TransparentColor := clFuchsia; // Insert color here
glyph.Assign(bmp);
I don't know if this piece of code works, but xpm files do contain
transparency information: one of the possible colors of a pixel is
clNone, which means transparent. bmp files don't contain transparency
information.
Vincent
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives