FMX.TabControl.TTabControl.GotoVisibleTab

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GotoVisibleTab(Index: Integer; ATransition: TTabTransition = TTabTransition.Slide;  const ADirection: TTabTransitionDirection = TTabTransitionDirection.Normal): Boolean;

C++

bool __fastcall GotoVisibleTab(int Index, TTabTransition ATransition = (TTabTransition)(0x1), const TTabTransitionDirection ADirection = (TTabTransitionDirection)(0x0));

Properties

Type Visibility Source Unit Parent
function public
FMX.TabControl.pas
FMX.TabControl.hpp
FMX.TabControl TTabControl

Description

Sets the focused tab using the specified transition. Animation of the switch transition depends on mutual positions of the current focused tab and the specified tab.

GotoVisibleTab switches the active tab to the tab specified by the Index parameter if possible (the tab with the specified Index exists and it is visible). GotoVisibleTab switches the active tab using the switch transition specified by the ATransition and ADirection parameters and taking into account mutual positions of the current active tab and the tab specified by Index.

ATransition specifies the type of transition used to switch the tab. When ATransition = Slide, then the tab control uses visual animation for the switching action. That is, moving of contents in the switched tabs is animated. The default ATransition is Slide.

ADirection specifies the direction in which the content of the current active tab is replaced with the content of the specified Index tab. ADirection is taken into account only when ATransition = Slide. GotoVisibleTab animates switching transitions of tabs taking into account mutual positions of the current active tab and the tab specified by Index:

  • When ADirection = Normal. If the destination tab is left of the current active tab (lower Index), then the forward left-to-right switching transition animation of tab items is used. If the tab to display is to the right of the active tab (upper Index), then the backward right-to-left switching transition animation of tab items is used.
  • When ADirection = Reversed, then the switching transitions uses the opposite animation directions to the described above.

The default ADirection is Normal.

In difference to SetActiveTabWithTransition, the GotoVisibleTab method animates the switch transition depending on mutual positions of the current focused tab and the specified Index tab.

GotoVisibleTab returns True in case of success and False otherwise.

See Also