Microsoft KB Archive/156870

= PRB: Mouse & Click Events Behavior in List Box and Grid Differ =

Article ID: 156870

Article Last Modified on 12/1/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q156870



SYMPTOMS
The Mouse and Click events do not fire on same areas of the object. The Click event ignores clicks to the scroll bar.



STATUS
This behavior is by design.



MORE INFORMATION
The behavior of the Mouse and Click events differ. The Click event executes after clicking on the item itself; however, the Click event ignores clicks to the object's scroll bars. For example, clicking on an item listed in a list box triggers the Click event.

Conversely, Mouse events react to both clicks on the object and the scroll bars of the object. For example, consider a list box and its scroll bars. A MouseUp or MouseDown event fires after clicking the contents of the list box or the scroll bars of the object.

This behavior occurs with grid and list box objects.

Steps to Reproduce Behavior
 Create a form called Test. Place a list box object on the form. Right-click the list box and start the Builder. Under the List Items tab, change the "Fill List with" box to "Data entered by hand." Enter in three values for three rows. Choose the OK button.  In the MouseUp, MouseDown, and Click events of the list box enter the following command: WAIT WINDOW PROGRAM  Run the form and click on the scroll bars. Only the MouseUp and MouseDown events fire. Now click on a row of the list box. The Click, MouseUp, and MouseDown events all respond.</li></ol>

Additional query words: kbdsd VFoxWin

Keywords: KB156870

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.