Reputation: 125
I add a tab to my tabcontrol with a buttonclick and I can close these tabs with the middle mouse button. Now I want add that I can separate the tabs like Chrome or Firefox. For that I must click down the mouse and move them out to separate which handler is that or how can i realize that?
I use Visual Studio 2015 with Winforms
Upvotes: 0
Views: 375
Reputation: 2855
I think what you should do is create a new control on click, one that has all the children of the tab you want to separate (and then dispose the old tabwindow control). Then when you have this separate control, you can implement dragging, and handle a drop on the tab control you want it to add to. The dropping handler would contain code that transforms the new control back to a tabwindow, and adds it to the tabcontrol.
Upvotes: 1