Vcl.ComCtrls.TCustomTabControl.CanShowTab

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function CanShowTab(TabIndex: Integer): Boolean; virtual;

C++

virtual bool __fastcall CanShowTab(int TabIndex);

Properties

Type Visibility Source Unit Parent
function protected
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TCustomTabControl

Description

Selection permission event dispatcher.

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.

See Also