Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TabControl TabIndexChanged won't fire

Tags:

winforms

The TabIndexChanged event of the Windows Forms TabControl doesn't fire when I change between tabs. But the SelectedIndexChanged event is fired.

What is the explanation for this?

like image 572
Aharon Muallem Avatar asked Oct 04 '11 15:10

Aharon Muallem


1 Answers

The TabIndexChanged event fires when you change the TabIndex property of the control-- the order of controls related to the parent form, etc. It has nothing to do with when the user is switching tabs.

Besides the SelectedIndexChanged event, you probably want to explore the Selected, Selecting, Deselected, and Deselecting events to determine what to do when the user is changing tabs.

like image 194
LarsTech Avatar answered Nov 15 '22 06:11

LarsTech