如何在delphi中禁用和启用按钮
这是我的代码
procedure Tfrm_color_demo.btn_purpleClick(Sender: TObject);
begin
frm_color_demo.color := clpurple;
frm_color_demo.caption := 'purple';
#disable btn_purple enable btn_yellow
end;
procedure Tfrm_color_demo.btn_yellowClick(Sender: TObject);
begin
frm_color_demo.color := clyellow;
frm_color_demo.caption := 'yellow';
#disable btn_yellow enable btn_purple
end;
end.
答案 0 :(得分:3)