RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TTabSet.SelectNext Method

Selects the next tab in a tab set control, scrolling if necessary to bring the selected tab into view.

Pascal
procedure SelectNext(Direction: Boolean);
C++
__fastcall SelectNext(Boolean Direction);

The value of the Direction parameters determines if the tab to the left or right is selected. If Direction is true, the tab to the right is selected. If Direction is false, the tab to the left is selected. When the last tab in either direction is selected, calling SelectNext using the same direction wraps around to the beginning of the tab order. For example, if your application has three tabs, First, Second, and Third, and Third is the current tab, calling SelectNext(true) selects First. Likewise, if First is the current tab, SelectNext(false) selects Third. 

When SelectNext is called, the OnClick event of the tab set occurs, followed by the OnChange event, just as if the user had clicked on a new tab. 

 

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