Vcl.AppEvnts.TCustomApplicationEvents.OnActionUpdate

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnActionUpdate: TActionEvent read FOnActionUpdate write FOnActionUpdate;

C++

__property System::Classes::TActionEvent OnActionUpdate = {read=FOnActionUpdate, write=FOnActionUpdate};

Properties

Type Visibility Source Unit Parent
event protected
Vcl.AppEvnts.pas
Vcl.AppEvnts.hpp
Vcl.AppEvnts TCustomApplicationEvents

Description

Occurs when an action's Update method is called and its action list has not already handled it.

Use the OnActionUpdate event handler to update the properties of an action when the application is idle if the action's action list does not handle it in an OnUpdate event handler. OnActionUpdate occurs after the OnIdle event.

If the action list that contains the action does not update it in an OnUpdate event handler, the action is routed to the Application object's OnActionUpdate event. The application events object hooks this event and responds with its own OnActionUpdate event handler.

The Handled parameter of the event handler returns false by default. If the handler updates the event, it should change Handled to true, thereby ending the processing of the action. When the event handler exits with Handled set to false, the event first goes to any other application events objects, and then the action's OnUpdate event occurs. If the action is not updated after that, the active control's UpdateAction method is called to allow the target to update the action. Finally, the active form's UpdateAction method is called if all other handlers do not handle the action.

Note: Call the CancelDispatch method from an OnActionUpdate event handler to prevent the application from forwarding the event to any other application events objects.

See Also

Code Examples