關於本網站上一篇在listview間隔中顯示顏色的問題
我的listview 命名為LV,已經從數據庫讀出了數據,但不知道為什麼那個顏色不能準確的顯示的listview的格子上,代碼是與網站上一樣的,請問要怎麼改才能準確顯示!
Dim i As Integer
Dim iFontHeight As Long
Dim iBarHeight As Integer
Dim j As Integer
Dim itmX As ListItem
Dim ColHead As ColumnHeader
Me.ScaleMode = vbTwips
picGreenbar.ScaleMode = vbTwips
picGreenbar.BorderStyle = vbBSNone
picGreenbar.AutoRedraw = True
picGreenbar.Visible = False
picGreenbar.Font = LV.Font
iFontHeight = picGreenbar.TextHeight("b") + Screen.TwipsPerPixelY
iBarHeight = (iFontHeight * 1)
picGreenbar.Width = LV2.Width
'======
picGreenbar.Height = iBarHeight * 2
picGreenbar.ScaleMode = vbUser
picGreenbar.ScaleHeight = 2
picGreenbar.ScaleWidth = 1
'draw the actual bars
picGreenbar.Line (0, 0)-(1, 1), vbWhite, BF
picGreenbar.Line (0, 1)-(1, 2), RGB(227, 241, 226), BF
'======
LV2.PictureAlignment = lvwTile
LV2.Picture = picGreenbar.Image