BUG: Setting Windowless ListBox ListIndex Fires Click Event (189733)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q189733 SYMPTOMS
When you programmatically select an item from a Windowless ListBox control,
the control's Click event is fired regardless of which item was previously
selected. This behavior differs from the standard ListBox control where
programmatically reselecting an item does not result in a Click event.
The behavior of selection through the use of the mouse is not affected and
is consistent between these two controls.
RESOLUTION
To work around this behavior, check to see if the value that you are about
to assign to the ListIndex matches the current ListIndex's value, and make
the assignment only if these values differ. See step 10 in the MORE
INFORMATION section of this article for an example.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this bug and will post
new information here in the Microsoft Knowledge Base as it becomes
available.
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbbug KB189733 |
---|
|