110,534
社区成员
发帖
与我相关
我的任务
分享
private void infom_DrawItem(Object sender, DrawItemEventArgs e)
{
int index = e.Index; //获取行号
Graphics g = e.Graphics; //获取绘画对象
Rectangle bound = e.Bounds;
string text = infom.Items[index].ToString();
e.DrawBackground();
g.FillRectangle(Brushes.White,bound);
TextRenderer.DrawText(g, text, this.Font, bound, Color.Black, TextFormatFlags.VerticalCenter | TextFormatFlags.Left);
}