如何设置GroupBox的边框有颜色或有凹凸感
展开全部
winform c# groupBox 的边框颜色【参考】
private void groupBox1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.Clear(groupBox1.BackColor);
e.Graphics.DrawString(groupBox1.Text, groupBox1.Font, Brushes.Red, 10, 1);
e.Graphics.DrawLine(Pens.Red, 1, 7, 8, 7);
e.Graphics.DrawLine(Pens.Red, e.Graphics.MeasureString(groupBox1.Text, groupBox1.Font).Width + 8, 7, groupBox1.Width - 2, 7);
e.Graphics.DrawLine(Pens.Red, 1, 7, 1, groupBox1.Height - 2);
e.Graphics.DrawLine(Pens.Red, 1, groupBox1.Height - 2, groupBox1.Width - 2, groupBox1.Height - 2);
e.Graphics.
private void groupBox1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.Clear(groupBox1.BackColor);
e.Graphics.DrawString(groupBox1.Text, groupBox1.Font, Brushes.Red, 10, 1);
e.Graphics.DrawLine(Pens.Red, 1, 7, 8, 7);
e.Graphics.DrawLine(Pens.Red, e.Graphics.MeasureString(groupBox1.Text, groupBox1.Font).Width + 8, 7, groupBox1.Width - 2, 7);
e.Graphics.DrawLine(Pens.Red, 1, 7, 1, groupBox1.Height - 2);
e.Graphics.DrawLine(Pens.Red, 1, groupBox1.Height - 2, groupBox1.Width - 2, groupBox1.Height - 2);
e.Graphics.
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询