Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find the index of a TabPage

I am using a For Each loop:

For Each tab As TabPage in TabControl1.TabPages

I cannot retrieve the index of tab. Is there a way to do this? I am trying to see if the index is below or above the current index.

like image 879
Bill Wohlers Avatar asked Oct 14 '13 12:10

Bill Wohlers


1 Answers

You can use the method IndexOf of the TabPageCollection to get the Index of a Tab.

Dim indexOfTab As Integer = TabControl1.TabPages.IndexOf(tab)
like image 179
Jehof Avatar answered Sep 28 '22 02:09

Jehof