Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 5 Jahren
Letzter Beitrag:
vor 5 Jahren
Beteiligte Autoren:
John Marrone, Piet van Zanten, Arie Mars, DarrenF

How do you end input in an edit control

Startbeitrag von John Marrone am 16.12.2009 20:56

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?
Antworten:
I suppose all your controls are read-only (except for that editbox), so there's no other control to TAB to? Just a guess...

von Arie Mars - am 16.12.2009 21:01
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.

von John Marrone - am 16.12.2009 22:03
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

von DarrenF - am 16.12.2009 23:24
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

von Piet van Zanten - am 17.12.2009 08:14
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.