PRB: DblClick Event Fires After Keystroke Followed by Space (166941)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q166941

SYMPTOMS

In Visual FoxPro 3.0x, 5.0x, and 6.0, the DBLCLICK event of a LISTBOX triggers after any keystroke followed by space. This can cause a problem when performing an incremental search on a search string that has spaces in between.

STATUS

This behavior is by design.

MORE INFORMATION

The DBLCLICK event should only trigger if a double mouse click is performed.

Steps to Reproduce Behavior

  1. Create a new form.
  2. Add a list box to the form. Set the RowSourceType property to 1 (Values), and RowSource to "AB, A B".
  3. Put the following code in the list box DBLCLICK event:
          WAIT WINDOW "DblClick"
  4. Save and run the form.
Try to find line "A B" using incremental search, for example, type A, then <Space>. The Wait window appears at the upper-right corner.

NOTE: Even if you do not have code for DBLCLICK event, there is no way to search for strings with spaces inside.

Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbprb kbProgramming KB166941 kbAudDeveloper