Microsoft KB Archive/146021

= PRB: Double-Clicking a Check Box Does Not Change Its Value =

Article ID: 146021

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition

-



This article was previously published under Q146021



SYMPTOMS
When you double-click a check box, its value changes once. For example, if a check box is unchecked, double-clicking it marks it as checked. A double- click does not behave differently from a click. It was expected that double- clicking a check box would change the value twice, resulting in no change at all.



CAUSE
When you double-click the check box, the Click event is triggered after the first click. This is what changes the value of the check box. The DblClick is then triggered. Visual FoxPro does not modify the value of a check box when the DblClick event is triggered.



WORKAROUND
To change the value of a check box with a double-click, you can insert either of the following commands in the DblClick event handler: KEYBOARD " "

-or-

MOUSE CLICK This will force the value to change when the DblClick event is activated.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
 Create a new form, and place a check box on the form. Save the form, and run it. The check box is not checked. Double-click the check box. The check box is checked. Close the form.  Modify the form. Insert the following command in the DblClick event: MOUSE CLICK  Save the form, and run it. When you double-click the check box, it remains unchecked.</li></ol>

Additional query words: double click

Keywords: KB146021

-

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

© Microsoft Corporation. All rights reserved.