RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TTabAction.UpdateTarget Method

Enables or disables the action, depending on the target tab control.

Pascal
procedure UpdateTarget(Target: TObject); override;
C++
virtual __fastcall UpdateTarget(TObject * Target);

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to the current conditions. 

Target is the potential target object identified by the application. 

In TTabAction, UpdateTarget ignores the Target parameter and checks, instead, whether the TabControl property is set. If TabControl identifies an enabled page control or tab control that has more than one page, UpdateTarget sets the Enabled property to true. If not, it sets Enabled to false. 

After setting the Enabled property, UpdateTarget generates an OnValidateTab event, where application-specific code can further determine whether the action should be enabled. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!