winform中怎么绘制圆角选项卡?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了winform中怎么绘制圆角选项卡?相关的知识,希望对你有一定的参考价值。

先看下这个效果

给你个思路:

重写TabControl控件,重载OnPaint方法

public class CustomTabControl : TabControl

        //......
        
        protected override void OnPaint(PaintEventArgs e)
        
            this.PaintTransparentBackground(e.Graphics, base.ClientRectangle);
            this.PaintAllTheTabs(e);
            this.PaintTheTabPageBorder(e);
            this.PaintTheSelectedTab(e);
        
        
        //......
参考技术A 用圆规就行 参考技术B 好像不行,自己写控件

以上是关于winform中怎么绘制圆角选项卡?的主要内容,如果未能解决你的问题,请参考以下文章

C#中 winform程序 怎么制作纵向选项卡

Winform选项卡双击关闭

C#winform的选项卡控件,怎么通过代码在一个tabcontrol控件里进行新建选项卡页,删除选项卡页,移位,等等

C# winform中TabControl怎么在每个选项卡的卡头添加不同的图标

winform开发时有多个界面怎么办

C# Winforms 选项卡控制选项卡宽度错误