bjwade62
Well-known member
- Joined
- May 25, 2006
- Messages
- 50
- Programming Experience
- 3-5
I recently moved a listview control inside a SplitContainer. The problem is the ActiveControl is the SplitControl not the listview inside it. Bug?? It worked fine as is until I put the ListView in the SplitterControl.
I have a contextmenu_click event containing the following code.
Private Sub cmnuSelectAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmnuSelectAll.Click
If ActiveControl.Name = lvwLeftList.Name Then
Dim ListLeft As ListViewItem
For Each ListLeft In lvwLeftList.Items
If ListLeft.ImageIndex <> 5 Then
ListLeft.Selected = True
End If
Next
End If
If ActiveControl.Name = lvwRightList.Name Then
Dim ListRight As ListViewItem
For Each ListRight In lvwRightList.Items
If ListRight.ImageIndex <> 5 Then
ListRight.Selected = True
End If
Next
End If
End Sub
I have a contextmenu_click event containing the following code.
Private Sub cmnuSelectAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmnuSelectAll.Click
If ActiveControl.Name = lvwLeftList.Name Then
Dim ListLeft As ListViewItem
For Each ListLeft In lvwLeftList.Items
If ListLeft.ImageIndex <> 5 Then
ListLeft.Selected = True
End If
Next
End If
If ActiveControl.Name = lvwRightList.Name Then
Dim ListRight As ListViewItem
For Each ListRight In lvwRightList.Items
If ListRight.ImageIndex <> 5 Then
ListRight.Selected = True
End If
Next
End If
End Sub