zoukankan      html  css  js  c++  java
  • C# 修改GroupBox的边框颜色和字体颜色

    改变GroupBox边框和的颜色

            private void groupBox_BasicInformation_Paint(object sender, PaintEventArgs e)
            {
                e.Graphics.Clear(this.groupBox_BasicInformation.BackColor);
                e.Graphics.DrawString(this.groupBox_BasicInformation.Text, this.groupBox_BasicInformation.Font, Brushes.Red, 10, 1);
                e.Graphics.DrawLine(Pens.Red, 1, 7, 8, 7);
                e.Graphics.DrawLine(Pens.Red, e.Graphics.MeasureString(this.groupBox_BasicInformation.Text, this.groupBox_BasicInformation.Font).Width + 8, 7, this.groupBox_BasicInformation.Width - 2, 7);
                e.Graphics.DrawLine(Pens.Red, 1, 7, 1, this.groupBox_BasicInformation.Height - 2);
                e.Graphics.DrawLine(Pens.Red, 1, this.groupBox_BasicInformation.Height - 2, this.groupBox_BasicInformation.Width - 2, this.groupBox_BasicInformation.Height - 2);
                e.Graphics.DrawLine(Pens.Red, this.groupBox_BasicInformation.Width - 2, 7, this.groupBox_BasicInformation.Width - 2, this.groupBox_BasicInformation.Height - 2); 
            }
  • 相关阅读:
    random模块的讲解
    函数的商城代码练习
    python文件作业
    函数的学习
    三元表达式和列表生成式
    jQuery 遍历方法
    CSS font属性综合写法
    JQuery 添加节点
    Bootstrap 响应式中的兼容
    jQuery 中的attr和prop的区别
  • 原文地址:https://www.cnblogs.com/AmatVictorialCuram/p/5066629.html
Copyright © 2011-2022 走看看