ComboBox ItemHeight 再高一点

         public static void BindData(this ComboBox box, List<KeyValuePair<long, string>> data)
{
box.ItemHeight = ;
box.DropDownStyle = ComboBoxStyle.DropDownList;
box.DrawMode = DrawMode.OwnerDrawFixed;
box.DataSource = data;
box.DrawItem += (sender, e) =>
{
if (e.Index < )
{
return;
}
e.DrawBackground();
e.DrawFocusRectangle();
e.Graphics.DrawString(data[e.Index].Value.ToString(), e.Font, new SolidBrush(e.ForeColor), e.Bounds.X, e.Bounds.Y + );
};
}
上一篇:Oracle数据库入门——基础知识


下一篇:Java基础语法(练习)