// If the image list is present and the image index is set, draw the image if(this.imageList != null) // Draw item text pe.Graphics.DrawString(item.Text, pe.Font, new SolidBrush(item.ForeColor),bounds.Left + iOffset, bounds.Top); //根据项的颜色绘制文本 } 到此为止,ListBoxEx以完整的实现,并且支持可视化设计。 |
