Search results for 'TBitBtn'. 1 post(s) found.
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;
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 : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/29 05:08
moneyideas
-
Subject different money making ideas
2010/01/29 13:56
moneyideas
-
Subject different money making ideas
2010/01/31 16:39
moneyideas

Prev

Rss Feed