Search results for 'TBitBtn'. 1 post(s) found.

  1. 2007/09/11 Show *any* graphics as Glyph on a SpeedButton
2007/09/11 07:59

Show *any* graphics as Glyph on a SpeedButton


TBitBtn and TSpeedButton accept only BMP pictures, if you have some other picture format, like ICO or JPG, (in an Image component) you want to show as a Glyph, you'll need to "transform" it to Bitmap, here's how:

var
   bmp: TBitmap;
begin
   bmp:=TBitmap.Create;
   try
     bmp.Width := Image.Picture.Graphic.Width;
     bmp.Height := Image.Picture.Graphic.Height;
     bmp.Canvas.Draw(0, 0, Image.Picture.Graphic) ;
     BitBtn.Glyph:=bmp;
   finally
     bmp.Free;
   end;
end;

Another posts included in "Delphi"

TColor to HTML color (0)2007/09/11
TDesktopCanvas - draw on Windows Desktop (0)2007/09/11
TImage.Bitmap fade out (0)2007/09/11
Rotating Text (0)2007/09/11
Paint a Form with a tiled bitmap image (0)2007/09/11
Is Point in Polygon? (0)2007/09/11
Implementing a lasso drawing technique (0)2007/09/11
Grayscaling a bitmap ? (0)2007/09/11
Trackback 3 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 05:08 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 13:56 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:39 delete

    moneyideas