cmbBind(cmbDataItem, 21);
cmbDataItem.TextUpdate += new System.EventHandler(this.cmbDataItem_TextUpdate);
/// <summary>
/// 修改comboBox中值高度
/// </summary>
/// <param name="list"></param>
/// <param name="itemHeight"></param>
public static void cmbBind(ComboBox list, int itemHeight)
{
list.DropDownStyle = ComboBoxStyle.DropDownList;
list.ItemHeight = itemHeight;
list.DrawMode = DrawMode.OwnerDrawVariable;
list.DrawItem += new DrawItemEventHandler(delegate (object sender, DrawItemEventArgs e)
{
if (e.Index < 0)
{
return;
}
e.DrawBackground();
e.DrawFocusRectangle();
e.Graphics.DrawStrin