Selecting Items from List Box Using Object's WHEN ClauseID: Q119886 2.5x 2.60 2.60a | 2.00 2.5x 2.60 2.60a | 2.5x kbprg
The information in this article applies to:
SUMMARYIn FoxPro, the WHEN clause of an object is triggered any time an item in a list box is selected. In the following example, a user can select an item from a list box using a single mouse click instead of double-clicking the item as would be required if only the VALID clause were used.
MORE INFORMATION1. USE the CUSTOMER table found in the <FoxPro_directory>\TUTORIAL 2. Create a new screen.
3. In the Setup code for the screen, add the following command:
4. Create a GET field. In the Input box, type "X" (without the quotation
5. Place a list box on the screen. In the List Items box, select the From
6. In the WHEN clause of the list box, enter the following code:
7. Generate the screen and run it.
The GET field will be automatically filled with the first value in the list box. If the user clicks (or double-clicks) any item in the list box, the GET field will be updated. Additionally, if the user presses TAB to move to the list box, the currently selected value in the list box will update the contents of the GET field. Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.50b 2.50c 2.60 2.60a listbox KBCategory: kbprg KBSubcategory: FxprgGeneral
|
|
Last Reviewed: May 1, 1996 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |