Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trapping what is Clicked
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00099083
Message ID:
00099097
Views:
18
Hi Joseph,

The problem here is that the textbox.Valid is going to fire before any PEM of the Cancel button so I can't see any way of leaving it the way it is. I have 2 suggestions as to a solution:

1. Have a Search button as well as a Cancel button and take the code from the textbox.Valid and put it in the Searchbtn.Click. Set the Searchbtn.Default=.T. to react to Enter and Cancelbtn.Cancel=.T. to react to Escape.

2. Look at the quickfill class in the files section. Good class, I have just started using it myself for functionality similar to what you are doing.

HTH

>I have a form that is used to select an employee of one of our clients. The user types in any amount of digits of the last name into a text box and presses Enter. In the valid event of the text box the employee table is searched for all matches of the letters that were entered, and if there is more than one match, a pick list is displayed. There is also a Cancel button on the form. When the Cancel button is pressed, the pick list shouldn't appear. I trap for the Ctrl-C keypress in the text box's valid event (and just return .T. if it was pressed), but if the user mouse clicks the Cancel button, the pick list comes up and the user has to pick an employee before cancelling. This wasn't a problem in the past as all the users hated the mouse. But now they are starting to use the mouse and it is an irritation.
>
>Can I trap the mouse click on the cancel button in the text box's valid event?
>
>Thank for any help,
>
>Joe
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform