简体   繁体   中英

C# How can I separate a tab from tabcontrol like Firefox or Google Chrome?

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?

Update

I use Visual Studio 2015 with Winforms

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM