日期:2014-05-17  浏览次数:20824 次

请问一下winform中的标签是如何实现的?


请问一下前辈们,上图中的标签是如何实现的?
WinForm 标签

------解决方案--------------------
如果你想做出和VS2003一模一样的效果,还是使用一个商业控件吧,比如BCGControlBar For .NET或者Xtreme Suite。
------解决方案--------------------
1.重写TabControl控件

2.设置UserPaint样式 

        public TabControlEx()
        {
            SetStyle(ControlStyles.ResizeRedraw 
------解决方案--------------------
 ControlStyles.OptimizedDoubleBuffer 
------解决方案--------------------
 ControlStyles.UserPaint, true);
            this.SizeMode = TabSizeMode.Fixed;
            
        }
3.在OnPaint中重绘选项卡
 比如使用 Rectangle r = this.GetTabRect(i); 获取选项卡的Rectangle 。。。