C# 自定义 下拉框
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
namespace Custom
{
public class CustomComBoBox : ComboBox
{
private Color borderColor;
/// <summary>
/// 边框颜色
/// </summary>
public Color BorderColor
{
get { return borderColor; }
set { borderColor = value; }
}
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
ControlPaint.DrawBorder(this.CreateGraphics(), this.ClientRectangle, this.BorderColor, ButtonBorderStyle.Solid);
}
}
}
blog comments powered by Disqus
发布日期
2013-05-08