API:Vcl.ActnMan.TCustomActionControl.InitiateAction

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure InitiateAction; override;

C++

virtual void __fastcall InitiateAction();

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.ActnMan.pas
Vcl.ActnMan.hpp
Vcl.ActnMan TCustomActionControl

Description

Calls the action link's Update method if the control is associated with an action link.

Vcl.ActnMan.TCustomActionControl.InitiateAction inherits from Vcl.Controls.TControl.InitiateAction. All content below this line refers to Vcl.Controls.TControl.InitiateAction.

Calls the action link's Update method if the control is associated with an action link.

When the application is idle, the library makes a series of calls to allow controls to update their associated actions so that they reflect the current properties of the controls. The first of these is to the InitiateAction method of the each form, followed by the InitiateAction methods of its visible menus and controls.

InitiateAction calls the action's update method indirectly (through its action link), which leads to a number of events, any of which may update the action and stop the update process:

  1. First, the action list that contains the action receives an OnUpdate event.
  2. If the action list does not handle the OnUpdate event, then the Application object receives an OnActionUpdate event.
  3. If the OnActionUpdate event handler does not update the action, the action itself receives an OnUpdate event.
  4. If that does not update the action, the active control's UpdateAction method is called.
  5. Finally, if the action is still not updated, the active form's UpdateAction method is called.

See Also