Tabcontrol Header Click Event

Dec 6 2011 6:16 AM
Hi

I'm trying to add a click event to a tabpage in a tabcontrol, but only when the user clicks the tab header. This is also includes a click when the tabpage is already selected, so I can't really use SelectedIndexChanged. Although I can set a click event on the tabpage itself, it captures the click whenever I click anywhere on the tabpage, except on the header. It makes me believe there must be a way to create a click event only on the header, but I can't find a way to implement the handler.

Initially, I used an imagelist as well, because I wanted to fire an event when a user clicks on the image in the tabheader, but in this case I couldn't find the right place to add the handler either.

Does anyone know where I have to add my event?

Answers (1)