Hi,
I need help. When I check a checkbox I want the text in listview to be highlighted in blue, I am having a problem where whenever I do check the checkbox the text does not highlight blue unless I move my cursor into the listview. Also whenever I check each individual checkbox in the listview it won't highlight in blue. but if I have the main checkbox checked and I have my cursor over the listview the text will be highlighted in blue and if wanted to uncheck each individual text then it won't unhighlight the text.
Here are some pictures for reference:
[/URL][/IMG]
[/URL][/IMG]
In the first picture I would have the checkbox checked, but the text won't be highlighted. In the second image we moved the cursor into the listview and the text was highlighted. I want it so it is highlighted even without having to move the cursor into the listview.
Here is also the code that I use:
Thanks in advance
I need help. When I check a checkbox I want the text in listview to be highlighted in blue, I am having a problem where whenever I do check the checkbox the text does not highlight blue unless I move my cursor into the listview. Also whenever I check each individual checkbox in the listview it won't highlight in blue. but if I have the main checkbox checked and I have my cursor over the listview the text will be highlighted in blue and if wanted to uncheck each individual text then it won't unhighlight the text.
Here are some pictures for reference:
In the first picture I would have the checkbox checked, but the text won't be highlighted. In the second image we moved the cursor into the listview and the text was highlighted. I want it so it is highlighted even without having to move the cursor into the listview.
Here is also the code that I use:
Code:
Private Sub CheckBox3_Change()
Dim i As Integer
Call OptimizeCode_Start
If CheckBox3.Value = True Then
For i = 1 To lvRequests.ListItems.Count
lvRequests.ListItems(i).Selected = True
lvRequests.ListItems.Item(i).Checked = True
Next i
Else
For i = 1 To lvRequests.ListItems.Count
lvRequests.ListItems(i).Selected = False
lvRequests.ListItems.Item(i).Checked = False
Next i
End If
Call OptimizeCode_End
End Sub
Thanks in advance