delphi ComboBox ComboBox是灰色的,点击一个按钮,ComboBox变得可以点击,点击另一个按钮,变得可以点 5
ComboBox的Enable属性,点击一个按钮,Enable变成Ture,点击另一个,Enable变成False。...
ComboBox的Enable属性,点击一个按钮,Enable变成Ture,点击另一个,Enable变成False。
展开
2个回答
展开全部
type
TForm1 = class(TForm)
ComboBox1: TComboBox;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
combobox1.Enabled :=true;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
combobox1.Enabled :=false;
end;
TForm1 = class(TForm)
ComboBox1: TComboBox;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
combobox1.Enabled :=true;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
combobox1.Enabled :=false;
end;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询