.NET: Double-click event in TabControl

I would like to intercept an event in the .NET Windows Forms TabControl when the user changes the tab by double-clicking the tab (and not just clicking it).

Do you have any idea how I can do this?

+5
source share
3 answers

The MouseDoubleClick event for TabControl seems to respond perfectly to a double click. The only additional step I would take is to set a short timer after the TabIndexChanged event, to track that a new tab has been selected, and to ignore any double clicks that occur outside the timer. This will prevent double-clicking on the selected tab.

+3
source

For some reason, MouseDoubleClick, as Jason Z suggested, only shoots when it clicks on tabs, and clicking on the tab bar does nothing, so that's exactly what I was looking for.

+1
source

TabControl DoubleClick?

0

All Articles