for i := 0 to self.ActionList1.ActionCount-1 do
begin
ActionList1.actions[i].Enabled:=false
end;
这样写为什么会报错,我想让ActionList1里的所有action失效要怎么写呢?
begin
ActionList1.actions[i].Enabled:=false
end;
这样写为什么会报错,我想让ActionList1里的所有action失效要怎么写呢?
for i := 0 to self.actmgrActionList1.ActionCount-1 do
begin
TAction(actmgrActionList1.actions[i]).Enabled:=false
end;
TAction继承自TCustomAction-TContainedAction
TContainedAction没有Enabled这个属性,需要转型