Keep List Box from Jumping to First Entry Beg w/ 2nd Char

ID: Q95674

The information in this article applies to:

SUMMARY

The _DBLCLICK variable can be used to increase the efficiency of searching through a sorted list box. For example, to search a list box for all entries beginning with the characters "SC", the setting of the _DBLCLICK variable determines if the second keystroke, "C", will bring the insertion point to entries beginning with "C" or "SC".

MORE INFORMATION

The _DBLCLICK variable is commonly used to check the intervals between mouse double-clicks and triple-clicks. It can also be used to check the intervals between keystrokes. _DBLCLICK can range from 0.5 to 5.5 (seconds). The default value is 0.5.

The following steps illustrate the keyboard use of _DBLCLICK:

1. Make sure the FoxPro Help system is set to FOXHELP.DBF by issuing the

   following command in the Command window:

      SET HELP TO FOXHELP.DBF

2. Make sure _DBLCLICK is set to the default value by issuing the following
   in the Command window:

      _DBLCLICK = 0.5

3. In the Command window, type "HELP" (without the quotation marks) and
   press the ENTER key.

4. Press S. (SAVE MACROS will be the highlighted entry.)

5. Press C. (CALCULATE will be the highlighted entry.)

6. In the Command window, issue the following command:

      _DBLCLICK = 2.5

7. Return to the HELP window and repeat steps 3 and 4. (SCAN will be
   the highlighted entry.)

8. Press H. (SCHEME will be the highlighted entry.)

NOTE: In an @ ... GET list, if _DBLCLICK is set to a high value in the WHEN clause and set back to the default in the VALID clause, it will not affect the double-click setting of the mouse in other fields.

Additional reference words: FoxDos FoxWin 2.00 2.50 keyboard delay one time listbox character incremental search KBCategory: kbprg KBSubcategory: FxprgGeneral

Last Reviewed: October 5, 1995