我actionlist的enable属性从数据库中读取,但是button却接收不了,要重新赋值
button1.Action:= TAction(ActionList1.Actions[0])才可以,而用visible属性不用重新赋值,为什么?是不是有什么地方要设置?如果每个button都要重新赋值,那太麻烦了。但是设置visible属性的话,界面又不好看。
button1.Action:= TAction(ActionList1.Actions[0])才可以,而用visible属性不用重新赋值,为什么?是不是有什么地方要设置?如果每个button都要重新赋值,那太麻烦了。但是设置visible属性的话,界面又不好看。
procedure TForm1.Button2Click(Sender: TObject);
begin
TAction(ActionList1.Actions[0]).Enabled:=false;
end;
执行后button1的enable并未变为false;
但是将enable改为visible的话,执行后button1就不可见了,真的很奇怪。
var Handled: Boolean);
begin
Handled:=true;
end;