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

Enter Key, pls Help.

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I created a dialog box to show record from a database, upon user input into search edit box.
My dialog consist of a edit box where a user can type info to see details, and a Find button, What happens is that when i type a value into my edit box and press Enter key instead of Find button the dialog disapears, how con i stop this happening and use the Enter key do the same thing as the Find button.
What i am trying to is that the user can either use the Enter key or Click on Find Button.

I tried a function like OnSetFocus on my edit box Highlight the Find button so if the user presses on the Enter key, it would find the record for him.

This did not work, What could i be do worng, can someone pls help me, or show me how i can achive this...

On initial when i added the dialog box i had Cancle and OK button which i removed and added my own buttons.
 
try this,

in the resourceview of your project,
right click on your find button,change one of its properties "default button" to on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top