25112102 调整表格表头按客户需求来

This commit is contained in:
moxiliang
2025-11-21 10:47:58 +08:00
parent a1ea8fb655
commit b5f208b3ca
648 changed files with 0 additions and 1546311 deletions

View File

@@ -1,34 +0,0 @@
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace C_Windows_1
{
public partial class MyGroupBox : GroupBox //Component
{
public MyGroupBox()
{
InitializeComponent();
}
public MyGroupBox(IContainer container)
{
container.Add(this);
InitializeComponent();
}
protected override void OnPaint(PaintEventArgs e)
{
var vSize = e.Graphics.MeasureString(this.Text, this.Font);
e.Graphics.Clear(this.BackColor);
e.Graphics.DrawString(this.Text, this.Font, new SolidBrush(this.ForeColor), 10, 1);
e.Graphics.DrawLine(Pens.DarkSlateGray, 1, vSize.Height / 2, 8, vSize.Height / 2);
e.Graphics.DrawLine(Pens.DarkSlateGray, vSize.Width + 8, vSize.Height / 2, this.Width - 2, vSize.Height / 2);
e.Graphics.DrawLine(Pens.DarkSlateGray, 1, vSize.Height / 2, 1, this.Height - 2);
e.Graphics.DrawLine(Pens.DarkSlateGray, 1, this.Height - 2, this.Width - 2, this.Height - 2);
e.Graphics.DrawLine(Pens.DarkSlateGray, this.Width - 2, vSize.Height / 2, this.Width - 2, this.Height - 2);
}
}
}