c# listview表头header的重绘问题?
其中白色的那个怎么也去不掉,不知道为什么? voidEXListView_DrawCol...
其中白色的那个怎么也去不掉,不知道为什么? void EXListView_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e) { //e.Graphics.FillRectangle(Brushes.Transparent, e.Bounds); //if (_itemBrush != null) // e.Graphics.FillRectangle(_itemBrush, e.Bounds); //else // e.Graphics.FillRectangle(Brushes.White, e.Bounds); e.Graphics.DrawImage(this.columnHeaderBackImg,e.Bounds); //string text = e.Header.Text; //StringFormat sf = new StringFormat(); //sf.Alignment = StringAlignment.Center; //sf.LineAlignment = StringAlignment.Center; //sf.FormatFlags = StringFormatFlags.LineLimit; //sf.Trimming = StringTrimming.EllipsisCharacter; //sf.HotkeyPrefix = HotkeyPrefix.Show; //e.Graphics.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; //e.Graphics.DrawString(text, e.Font, new SolidBrush(e.ForeColor), e.Bounds, sf); //sf.Dispose(); }
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询