如何使TabPages可拖动?
我想让用户通过拖放来重新排列 TabPages 顺序。此外,如果用户能够将 TabPages 从一个 TabControl 拖动到另一个 TabControl,那就太酷了。两种方式都与 Firefox 和 Total Commander 类似。如何实现这一目标?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
通过拖放重新排序 TabPages - 作者:Ludwig B.
灵感来自 http://dotnetrix.co.uk/tabcontrol.htm#tip7
reordering TabPages with drag and drop - by Ludwig B.
inspired by http://dotnetrix.co.uk/tabcontrol.htm#tip7
基于onx23的回答。
(请原谅我的死灵发布。)
更新
我已经编写了一个允许拖动和关闭选项卡(可配置)的实现,它可用 在 Bitbucket 上。
Based on onx23's answer.
(Forgive me for necro-posting.)
UPDATE
I've written an implementation that allows both dragging and closing tabs (configurable), it's available on Bitbucket here.
这是一种在不同 TAB 控件之间启用拖动的方法。当第二个控件还没有选项卡时,这也适用(尽管覆盖 Wndproc)。
根据bruce965的答案,发现信息此处。希望这对寻找可拖动选项卡的人有所帮助!
Here is a way to also enable dragging between different TAB controls. This also works when the second control has no tabs yet (though overriding Wndproc).
Based on the answer of bruce965, and info found here. Hope this is helpful for anyone looking for draggable tabs!