日期:2014-05-17 浏览次数:20841 次
public partial class TdPanel : UserControl
{
[DefaultValue(typeof(Color))]
public Color LineColor
{
get { return LineColor; }
set { LineColor = value; }
}
public TdPanel()
{
InitializeComponent();
}
private void TdPanel_Resize(object sender, EventArgs e)
{
panel1.Size = this.Size;
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
ControlPaint.DrawBorder(e.Graphics,
this.panel1.ClientRectangle,
this.LineColor, //left
1,
ButtonBorderStyle.Solid,
this.LineColor, //top
1,
ButtonBorderStyle.Solid,
this.LineColor, //right
1,