Welcome! Log In Create A New Profile

Advanced

How do you end input in an edit control

Posted by John Marrone 
John Marrone
How do you end input in an edit control
December 16, 2009 09:56PM
Hi

I'm back, sorry. But how in the heck do you finish your input in a edit control. I have tried the enter key and the tab but neither one does the trick. Right now if I click on one of the other control is the only way I can finish my data input in the edit control. Can you not just let the user hit the enter key when they are done entering data?



Edited 1 time(s). Last edit at 12/16/2009 09:58PM by John Marrone.
Arie
Re: How do you end input in an edit control
December 16, 2009 10:01PM
I suppose all your controls are read-only (except for that editbox), so there's no other control to TAB to? Just a guess...
John Marrone
Re: How do you end input in an edit control
December 16, 2009 11:03PM
You would be right, this is the only input on the window. But there has got to a way. I think maybe put another text box on the window and make it invisible. But would I lose the cursor. Going to try that but there should be a way the end the input with the enter key. Thanks for letting me know about not having another input on the window. Thanks again.
DarrenF
Re: How do you end input in an edit control
December 17, 2009 12:24AM
Hi John,

You could always add the Key Up event to your edit field

Might mean some fancy coding though to trap the entry waiting for a Charact(13)???
.
.
.
Sorry John - I went too soon - here's the fancy code [[5]]

Try adding this to the Entry event of your field (...forget what I said above):

VK_RETURN is int = 0x0d
nKey is int = VK_RETURN // Enter key

// Checks whether enter key was pressed
IF KeyPressed(nKey) THEN
	Info("Enter!")
END

Seems to work a treat when I tested it...

Regards, Darren



Edited 2 time(s). Last edit at 12/17/2009 01:19AM by DarrenF.
Piet van Zanten
Re: How do you end input in an edit control
December 17, 2009 09:14AM
Hi John,

An off-screen button would do the trick. If the button has tab and validate properties then both tab and enter will work.

Regards,
Piet
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: