RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomTabControl.CanShowTab Method

Selection permission event dispatcher.

Pascal
function CanShowTab(TabIndex: Integer): Boolean; virtual;
C++
virtual __fastcall Boolean CanShowTab(int TabIndex);

CanShowTab is called automatically when an attempt is made to show a tab. CanShowTab is exposed as a protected method so that descendants can override this method to provide application-specific criteria that determines whether a tab is accessible. 

TabIndex is the index of the tab in the list of labels maintained by the Tabs property. 

CanShowTab returns a Boolean value that indicates whether the tab specified in TabIndex can be accessed.

Tip: CanShowTab can be used with such methods as CanFocus (TWinControl) to determine whether the tab can both be accessed and can receive focus. Criteria for an overridden CanShowTab might include checking whether the tab is enabled.
 

 

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