TActionManager
descends from TCustomActionList
, so whatever you can do with the latter, you can do with the former. It has two properties you'll need to use, Actions
, which is the array property that gives you access to all the list's actions, and ActionCount
, which tells you how many there are. Use them to write an ordinary loop, like this:
var
i: Integer;
Contained: TContainedAction;
Action: TCustomAction;
begin
for i := 0 to Pred(ActionList.ActionCount) do begin
Contained := ActionList[i]; // shorthand for ActionList.Actions[i]
if not (Contained is TCustomAction) then
continue; // Doesn't have Checked property
Action := TCustomAction(Contained);
Action.Checked := False;
end;
end;
Action lists can hold lots of kinds of actions, and they don't all have Checked
properties. That property is introduced in TCustomAction
, so the code above also filters out the things that don't descend from that class.