Im new to this but the logic seems right, would appreciate any help.
I'm trying to make the Button get smaller twice and then finally return back to it's original size.
procedure TForm1.Button1Click(Sender: TObject);
begin
if Button1.tag = 0 then
begin
Button1.width := 200;
Button1.height := 45;
Button1.caption := 'Smaller Button';
Button1.tag := 1;
end;
if Button1.tag = 1 then
begin
Button1.width := 150;
Button1.height := 30;
Button1.caption := 'Even Smaller Button';
Button1.tag := 2;
end;
if Button1.tag = 2 then
begin
Button1.width := 280;
Button1.height := 64;
Button1.caption := 'Big Again';
Button1.tag := 0;
end;
Thanks in advance!