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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grid losing focus 1

Status
Not open for further replies.

EMJULIAN

Programmer
Aug 14, 2002
45
US
I use a text box and a grid to enter data into another grid. If I double click on the record in grid A, it calls ADD and then sets the focus to a field in grid B, like it's supposed to. However, if I use the arrow keys to move down to the record and press <ENTER> on the record in grid A, it calls ADD and sets the focus to the field in grid B, but then moves the focus to the text box. Any idea why the same code sets the focus differently depending on whether it's called from a dblclick or from a keypress?

Thanks,
Eve
 
I would expect pressing enter in a control would cause default behavior to go to the next tabstop. Add NODEFAULT to the keypress event.

Regards,

Mike
 
B-e-a-utilful! That fixed the problem. Thanks for the quick response.

Eve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top