Einzelnen Beitrag anzeigen

dominikkv

Registriert seit: 30. Sep 2006
Ort: Gundelfingen
1.109 Beiträge
 
Delphi 2007 Professional
 
#4

Re: TImage wird nicht transparent dargestellt

  Alt 6. Jun 2007, 15:08
Zitat von DGL-luke:
hallo, das sollte man etwas anders machen:

Delphi-Quellcode:
var
  tempBmp: TBitmap;
begin
  Imaglist.GetBitmap(index, tempBmp);

  tempBmp.Transparent := true;
  Image.Picture.Graphic.Assign(tempBmp);
end;
So müssts auch funktionieren.
vor dem GetBitmap fehlt ein
tempBmp := TBitMap.Create; sonst gibts ne Fehlermeldung
ansonsten würd ich auch mal
tempBmp.PixelFormat := pf24Bit; probieren...

Delphi-Quellcode:
var
  tempBmp: TBitmap;
begin
  tempBmp := TBitMap.Create;
  Imaglist.GetBitmap(index, tempBmp);
  tempBmp.PixelFormat := pf24Bit;
  tempBmp.Transparent := true;
  Image.Picture.Graphic.Assign(tempBmp);
end;
[edit] ... es fehlt am schluss noch ein
tempBmp.free; [/edit]
Dominik
  Mit Zitat antworten Zitat