[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'ActnList' (#lcl)

# TCustomActionList.ExecuteAction

Examines and executes the specified Action.

## Declaration

Source position: actnlist.pas line 107

`public function TCustomActionList.ExecuteAction(`
`Action: TBasicAction`
`):Boolean; override;`

## Arguments

`Action` |  | Action examined and potentially executed in the method.

## Function result

True if the specified action can be executed for the target component.

## Description

ExecuteAction is an overridden Boolean function in TCustomActionList. ExecuteAction is used to determine whether the specified Action is supported for a given component and was successfully executed.

ExecuteAction re-implements the method from the ancestor class (TComponent) to signal the OnExecute event handler to examine and potentially execute the specified Action. The return value indicates whether the action was successfully executed. The default return value is False, and indicates the following:

- An OnExecute event handler has not been assigned for the action list.
- Action is not supported for the component where the action list is used.

An application must implement and assign a handler routine to OnExecute which sets the return value and calls ExecuteTarget when the ActionComponent is a supported target for the action.

## See also

TComponent.ExecuteAction
TBasicAction.HandlesTarget
TBasicAction.ExecuteTarget