Home > Net >  Made a custom CheckedListBox class, want to different colors in a row, but no effect, where is the m
Made a custom CheckedListBox class, want to different colors in a row, but no effect, where is the m

Time:04-26

My idea is line of black words in the singular, dual line of red characters, but doesn't work, don't make a mistake, use the VS2003 no, tried on VS2008 can


Protected Overloads Overrides Sub OnDrawItem (ByVal e As DrawItemEventArgs)
If e.I ndex Mod 2=0 Then
Dim e2 As DrawItemEventArgs=New DrawItemEventArgs (um participant raphics, e.F ont, e.B ounds, e.I ndex, e.S Tate, Color. Red, e.B ackColor) 'New DrawItemEventArgs (um participant raphics, e.F ont, New Rectangle (e.B ounds, Location, e.B ounds, Size), e.I ndex, e.S Tate, Color. Red, e.B ackColor)
MyBase. OnDrawItem (e2)
The Else
MyBase. OnDrawItem (e)
End the If
End Sub
  • Related