Thema: Delphi Speedbutton + Canvas

Einzelnen Beitrag anzeigen

Benutzerbild von NicNacMan
NicNacMan

Registriert seit: 28. Mai 2004
Ort: Hamburg
98 Beiträge
 
Delphi 2005 Personal
 
#2

Re: Speedbutton + Canvas

  Alt 1. Sep 2005, 16:47
keine ahnung wieso, aber bei mir gehts nur mit Rect(1, 1, bmp.Width, bmp.Height)
und natürlich brush.color statt pen.color
Delphi-Quellcode:
bmp := TBitmap.Create;
try
  bmp.Width := SpeedButton1.Width -4;
  bmp.Height := SpeedButton1.Height -4;
  bmp.Canvas.Brush.Color := clgreen;
  bmp.Canvas.FillRect(Rect(1, 1, bmp.Width, bmp.Height));
  SpeedButton1.Glyph.Assign(bmp);
finally
  bmp.Free;
end;
The Double-Crunch-Peanuts!
SwapIt:
  Mit Zitat antworten Zitat