TCustomActionList.IndexOfName function
Gets the ordinal position for the action with the specified name.
Declaration
function IndexOfName(const ActionName: string): IntegerArguments
ActionName | Name for the action to locate in the Actions property. |
Function result
Ordinal position where the action with the specified name is stored, or -1 when not found.
Description
IndexOfName is an
Integer function used to get the
position in Actions where the TAction instance with the name in
ActionName is stored.
IndexOfName visits the class instances in Actions (in reverse order) and calls the CompareText routine in SysUtils to perform a case-insensitive comparison to Name properties in each. The return value contains the ordinal position in Action where the first matching name was located, or -1 when ActionName is not found.
IndexOfName is used to implement the ActionByName method.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
