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

# TCustomForm.DoExecuteAction

Asks every visible control to Execute the specified action ExeAction.

## Declaration

Source position: forms.pp line 570

`protected function TCustomForm.DoExecuteAction(`
`ExeAction: TBasicAction`
`):Boolean;`

## Arguments

`ExeAction` |  | Action to execute.

## Function result

True, if any control handles the action.

## Description

DoExecuteAction asks every visible control to Execute the specified action ExeAction. If some control executes it and returns true, then the traversal of visible components is stopped. All child controls (and its children etc) are queried too.

For example you have

    TForm
       TPanel
         TButton
         TCheckBox
       TMemo

then the following controls are queried in this order: TPanel, TButton, TCheckBox, TMemo.

But first of all, the Form itself and the ActiveControl are asked to execute the given action.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.