Sign in Join
FPDoc Onlineexperiment

TCustomActionList.ActionByName function

Member of TCustomActionListpublicIn unit ActnList

Returns an action identified by its name.

Declaration

pascal
function ActionByName(const ActionName: string): TContainedAction

Arguments

ActionName

Name of the action to locate in the Actions property.

Function result

Action with the specified name, or Nil when not found in Actions.

Description

ActionByName is a TContainedAction function used to retrieve an action from the list with the name specified in the ActionName argument. ActionByName calls IndexOfName to get the position for the specified action name.

The return value is the TContainedAction instance found with the given name, or Nil when the name is not located in Actions.

Use GetEnumerator to get an enumerator used to visit all of the values in the Actions property.

Use ActionCount and Actions to access actions in the list by their ordinal position.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.