RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TTabAction.OnValidateTab Event

Occurs when the application is idle or when the action list updates.

Pascal
property OnValidateTab: TValidateTabEvent;
C++
__property TValidateTabEvent OnValidateTab;

Use the OnValidateTab event rather than the OnUpdate event to update the properties of a tab action when the application is idle. Unlike the OnUpdate event, which prevents the default behavior of the UpdateTarget method, OnValidateTab occurs after UpdateTarget has set the Enabled property to reflect whether the target tab control is enabled. 

OnValidateTab can be used to update any of the properties of the tab action, but it is intended primarily for enabling or disabling the action, depending on the contents of the current page of the target tab control. 

Sender is the tab action component to update in this event. 

TabControl is the target tab control. 

Enabled reflects the Enabled property of this action. Set Enabled in the event handler to enable or disable the action depending on current conditions. 

 

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