是否有可能作出的WinForms选项卡控件能够做标签像IE或Firefox重新排序? [英] Is it possible to make the WinForms Tab Control be able to do tab reordering like IE or Firefox?

查看:125
本文介绍了是否有可能作出的WinForms选项卡控件能够做标签像IE或Firefox重新排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能重新排序的选项卡中的WinForms 的TabControl 在运行时如IE或Firefox?

Is it possible to reorder the tabs in the WinForms TabControl at run-time like IE or Firefox?

<一个href="http://stackoverflow.com/questions/3957559/tab-control-like-in-firefox-in-native-windows-app">Links像这样的不要给我太大的希望。

Links like this don't give me much hope.

推荐答案

当然,这是可能的!你最有可能想的过于复杂的解决方案。从本质上讲,所有你需要做的是子类的标准的TabControl 并添加一些逻辑,鼠标事件处理程序。你只需要检查形成用户当前拖动并重新排列在的TabPages 集合。

Sure, it's possible! You're most likely trying to overcomplicate the solution. Essentially, all you have to do is subclass the standard TabControl and add some logic to the mouse event handlers. You'll just need to check which form the user is currently dragging and reorder it in the TabPages collection.

有几个完整的解决方案可在网上:

There are a couple of complete solutions available online:

  • Reordering TabPages inside TabControl
  • Drag and Drop Tab Control
  • Reposition TabItems at runtime

这篇关于是否有可能作出的WinForms选项卡控件能够做标签像IE或Firefox重新排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆