Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FoxPro Gotcha?

Status
Not open for further replies.

Redsz

Programmer
Jul 30, 2002
158
0
0
CA
I just came accross an error that has me quite confused. I am performing a check on a user entered value in a text box. There is a save and a revert button. These buttons are a custom class that are an image contained inside a container and again the container is contained inside a pageframe. When i click with the mouse on these controls the valid event in the text box fires. These controls also have an on key label attached to them. Ie. F2 = Save.

When F2 is pressed the valid event code does not fire. I have tried moving this code to the lostfocus but the same thing occurs????

any ideas?
 
the press of the F2 key does not change the state of the control so the code does not fire. However sliding the mouse over the control and then clicking is equivilent to pressing the enter key. It changes the state of the control and thus forces an evaluation of the event.

Lostfocus occurs only when focus leaves your control. You would have to send the focus elsewhere on your form to get it to fire.

either locate your validation code as a function within a prg or as new event to the form and then call the function.
Dancing is easy. Now dancing on a floating raft in the middle of an October storm in the middle of the North Atlantic, that is hard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top