views:

99

answers:

1

Hi there,

I've been wondering about this problem for some time - doubleclicking a winforms TabControl's header doesn't get detected, but I'd like to handle this event.

It looks like all mouse events (click,move,etc.) don't get raised when they are on the 'inactive' area of TabControl. I've even tried subclassing TabControl, but the derived class' events aren't raised too. Overriding WndProc shown that it doesn't receive WM_LBUTTONDBLCLK message (I mean - WTF?).

Thanks. But I'm sure that the tab control knows that I've clicked on its header, it just doesn't let me know.

p.s. I've looked at http://stackoverflow.com/questions/32733/net-double-click-event-in-tabcontrol - but nothing

+1  A: 

Hm...I did a test project and I am getting both MouseDoubleClick and DoubleClick events. What do you mean by "Tabcontrol's header"? An actual tab or the blank area were additional tabs would show?

I used ftp://missico.net/eventspy.zip.

If you mean the blank area (which you do by the comment) then no, because there is nothing in the blank area. No control. What you need to do is put the TabControl in a Panel, and set the TabControl's Dock property to Fill. Handle the Panel's double-click events.

AMissico
Yes, I mean the blank area where additional tabs would show. Did it work for you?
Axarydax
No because there is nothing in the blank area. No control. Put the TabControl in a Panel, and set the TabControl's Dock property to Fill. Handle the Panel's double-click events.
AMissico