我的想法是單數行黑色字,雙數行紅色字,但不起作用,也不出錯,用的是VS2003不行 ,在VS2008上試了可以
Protected Overloads Overrides Sub OnDrawItem(ByVal e As DrawItemEventArgs)
If e.Index Mod 2 = 0 Then
Dim e2 As DrawItemEventArgs = New DrawItemEventArgs(e.Graphics, e.Font, e.Bounds, e.Index, e.State, Color.Red, e.BackColor) ' New DrawItemEventArgs(e.Graphics, e.Font, New Rectangle(e.Bounds.Location, e.Bounds.Size), e.Index, e.State, Color.Red, e.BackColor)
MyBase.OnDrawItem(e2)
Else
MyBase.OnDrawItem(e)
End If
End Sub
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/280120.html
標籤:VB.NET
上一篇:有折疊表格,不用DEV
