Knowledge Base

PRB: DblClick Event Fires After Keystroke Followed by Space

Article ID: 166941

Article Last Modified on 5/12/2003


APPLIES TO


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.

Keywords: kbprogramming kbprb KB166941