WinForm中TabControl的使用

  • TabControl和TabPage之间有一个默认颜色的边框,很难去除,需要重写TabControl控件重绘区域
 1     public class FullTabControl : TabControl
 2     {
 3         public override Rectangle DisplayRectangle
 4         {
 5             get
 6             {
 7                 Rectangle rect = base.DisplayRectangle;
 8                 return new Rectangle(rect.Left - 8, rect.Top - 8, rect.Width + 16, rect.Height + 16);
 9             }
10         }
11     }
View Code
    •  如果需要与父控件之间有间隔,可以用tabpage的padding来模拟
原文地址:https://www.cnblogs.com/wyp1988/p/9888359.html