BUG: ItemClick Event Fires After First ListItem Added to ListViewID: Q215385
|
The ItemClick event fires after the first ListItem is added to a ListView, even though the item was not clicked.
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
The ItemClick event fires only after adding the first item. Adding more items does not fire the ItemClick event.
Private Sub Command1_Click()
ListViewCtrl1.ListItems.Add , , "Item One"
End Sub
Private Sub ListViewCtrl1_ItemClick(ByVal Index As Long)
List1.AddItem "ItemClick fired."
End Sub
Option Explicit
Dim first_time As Boolean
Private Sub Command1_Click()
If first_time Then
ListViewCtrl1.ListItems.Add , , ""
ListViewCtrl1.ListItems.Add , , "Item One"
ListViewCtrl1.ListItems.Remove (1)
first_time = False
Else
ListViewCtrl1.ListItems.Add , , "Item One"
End If
End Sub
Private Sub Form_Load()
first_time = True
End Sub
Private Sub ListViewCtrl1_ItemClick(ByVal Index As Long)
If Not first_time Then
List1.AddItem "ItemClick fired."
End If
End Sub
Additional query words: vbce vbce6 wince wce
Keywords : kbToolkit kbVBp600bug kbWinCE kbWinCE100 kbGrpVB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 5, 1999