Get the index of the current tab in the tab panel