ImageList1.GetBitmap(random(2),SpeedButton1.Glyph);
var TB:TBitmap; begin TB:=TBitmap.Create; TB.Height:=speedbutton1.Height; TB.Width:=speedbutton1.Width; ImageList1.Draw(TB.Canvas,0,0,random(2),false); SpeedButton1.Glyph:=TB; TB.Free; end;
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionvar TB:TBitmap; begin TB:=TBitmap.Create; TB.Height:=speedbutton1.Height; TB.Width:=speedbutton1.Width; ImageList1.Draw(TB.Canvas,3,3,random(2),true); SpeedButton1.Glyph.Assign(TB);; TB.Free; end;
SpeedButton1.Glyph.Canvas ???