| View previous topic :: View next topic |
| Author |
Message |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Tue May 25, 2004 2:10 pm Post subject: [resolved] OnEnter event? |
|
|
I have a data entry dialog that has 3 main elements: a combo, a list, and another combo. They are in that order on the dialog.
This is for rapid data entry, so I like the way the combo element can move the selection along in the list as the user types, until they get to the row they want, then they just hit Enter.
When the dialog pops up, I send an F4 keystroke to it, which activates the first combo element and then user just begins typing, without having to use the mouse. Then they hit enter, tab to the list, and make their selection using up and down arrows. Then they tab to the second combo, but the dropdown part is not "activated" so they either have to hit F4 or use the mouse to drop it down.
My question: is there a way to know when they enter this element? If there were such a thing as an event that would fire when the user entered the field, that would be great, of course. I thought of trying to capture the tab keystrokes with hotkeys, but I can't come up with a good solution. Has anyone else ever tried to do this?
Thanks - _________________ Joe Floyd |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue May 25, 2004 2:51 pm Post subject: |
|
|
You can use the @focus() function with a timer loop to see which element has the focus...
| Code: | DIALOG CREATE,New Dialog,-1,0,240,160
DIALOG ADD,EDIT,EDIT1,16,11,180,19,EDIT1
DIALOG ADD,EDIT,EDIT2,47,8,180,19,EDIT2
DIALOG ADD,STATUS,STATUS1,STATUS1
DIALOG SHOW
:Evloop
wait event,0.001
goto @event()
:Timer
dialog set,status1,The focus now is on @focus().
goto Evloop
:Close
exit |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Tue May 25, 2004 3:08 pm Post subject: |
|
|
Hey! That works great!
I am setting a variable the first time it gets focus so that it only sends that the first time it has focus. If they have to go back and forth between the combos for some reason, they will be using the mouse anyway.
Thanks for the quick reply and the good tip - _________________ Joe Floyd |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|