selectTab implementation.