RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TApplication.UpdateAction Method

Generates an OnActionUpdate event.

Pascal
function UpdateAction(Action: TBasicAction): Boolean; reintroduce;
C++
__fastcall Boolean UpdateAction(TBasicAction Action);

When the application is idle, it makes a series of calls to update the properties (such as whether it is enabled, checked, and so on) of every action that is linked to a visible control or menu item. First, that action list that contains the action generates an OnUpdate event. If the action list does not handle the OnUpdate event, then the action is routed to the Application object's UpdateAction method, which invokes the OnActionUpdate event handler. (The application's UpdateAction method responds to all unhandled actions in the application.) If the OnActionUpdate event handler does not update the action, then it is routed to the action's OnUpdate event handler. If that does not update the action, the active control's UpdateAction method is called, followed (if necessary) by the active form's UpdateAction method. 

Do not call UpdateAction. It is called automatically when the application is idle. The Action parameter specifies the action to be updated. UpdateAction returns true if the action's properties are updated and require no further processing. Otherwise, UpdateAction returns false, and the default action processing continues. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!