开发者

Doubleclicking tab control header

开发者 https://www.devze.com 2022-12-22 05:56 出处:网络
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.

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 .NET : Double-click event in TabControl - but nothing


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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号