October 15th, 1999, 10:11 AM
A strange thing happens with the listview control: if I set the forecolor of the listitem to vbblue, the listitem in the listview appears as blue; if I set the forecolor of the listsubitem (depending on the listitem above) to vbblue, it appears in the listview as black!! Any other color works!! Why??
The code I wrote is the follow:
Do While Not rst.EOF
Set lstItem = lvwMessages.ListItems.Add(, , rst!Field1)
lstItem.ForeColor = vbBlue
With lstItem
Set lstSubItem = .ListSubItems.Add(Text:=rst!Field2)
lstSubItem.ForeColor = vbBlue
end with
rst.MoveNext
Loop
The code I wrote is the follow:
Do While Not rst.EOF
Set lstItem = lvwMessages.ListItems.Add(, , rst!Field1)
lstItem.ForeColor = vbBlue
With lstItem
Set lstSubItem = .ListSubItems.Add(Text:=rst!Field2)
lstSubItem.ForeColor = vbBlue
end with
rst.MoveNext
Loop