flomueller
17th December 2010, 12:27
Hi folks,
I've many fields in which the user should enter a number from zero to nine. It is very uncomfortable when you have to enter a "TAB" after every input. So i want a routine that automaticaly change to the next field after the user enter only one of the numbers between 0 - 9. I've tried every after.input, before.input, etc. but always I have to press the TAB key to change to the next field. Do you know a possibility to do this? I don't want to use the ASCII-Mode, all users are working in Baan-GUI.
Thx,
Flomueller
mark_h
17th December 2010, 16:23
Don't think there is a solution. You can search on automatic tab or in.ret.
Kozure Ohashi
17th December 2010, 20:04
Maybe this works (but I am not sure, so please try).
after.input:
to.field(field)
mark_h
17th December 2010, 22:39
You still have to hit a key to get to the after field event. When I was looking for something like this I could not get it to move to the next field automatically.
shah_bs
18th December 2010, 00:24
In ASCII mode, since field to field navigation was by Carriage-Return, there is a facility to 'emulate' auto-tab feature. I suppose because of the way the GUI systems works under the hood, they had to do away with the feature.
It seems TAB is the only mechanism that 'transfers' the value entered in the field on the form into the program script. I tried various field events (when.field.changes, after.input, on.input) and all of them expect the TAB before being triggered.
Hitesh Shah
23rd December 2010, 16:58
I have worked on field inputs where pressing special keys like CTRL + E, we open zoom session different from the session which come on normal zoom sessions . Mechanism is like this . When user presses CTRL + E and [^E] is specified as no wait character (ie keys for which not carriage return or tab is required ) baan pre-defined variable g.in.ret or in.ret gets it's ascii value 5 . This value can be trapped in on.input section . And in on.input section can get the value of the key pressed . And that can be used to initialize the field and also to generate an automatic tab (check code tab() in thi forum ) .
In ur case , u can define no wait characters as [0-9] OR [0123456789] . And it should work !!
All the best .
Hitesh Shah
24th December 2010, 08:48
No wait characters (check attr.nowait$ in before.input) work only for non-printable characters . So the aforesaid workaround will not work for printable characters like 0 to 9.
So there appears no solution in normal standard program flow (as advised by many others ).