Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which methods to use for a listbox?
Message
From
17/03/2006 14:06:42
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01104865
Message ID:
01105392
Views:
15
This message has been marked as the solution to the initial question of the thread.
First obvious idea would be to use a special listbox class with all code inside instead of repeating code for each listbox. But my main problem is to understand why do we need code in each of these methods? Would KeyPress and InteractiveChange be enough?

This is how the events fire in list boxes - obviously, it does not include the mouse events:
Action: Scroll through list using the down arrow
   KeyPress( 24, 0 )
   InteractiveChange
   Click
   When

Action: Select an item in the list using the mouse 
   InteractiveChange
   Click
   When

Action: Select an item in the list by pressing the <ENTER> key
   KeyPress( 13, 0 )
   DblClick
   Valid

Action: Exit the control by clicking elsewhere with the mouse
   LostFocus

Action: Exit the control using the <TAB> key
   KeyPress( 9, 0 )
   LostFocus
Previous
Reply
Map
View

Click here to load this message in the networking platform