![]() |
Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Add canvas to GroupBox
You should create a new type with Canvas property and use this new type for the type cast.
type TNewGroupBox = class(TGroupBox)
public
property Canvas;
end;
...
procedure TForm1.Button1Click(Sender: TObject);
var
MyBitmap: TBitmap;
begin
MyBitmap:=TBitmap.Create;
MyBitmap.LoadFromFile('factory.bmp');
with TNewGroupBox(GroupBox1).Canvas do
StretchDraw(
Rect(0,0,MyBitmap.Width,MyBitmap.Height),
MyBitmap);
end;
-
More for developers