Tab by pressing <Enter> key

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

So, I am debating with someone about this. He believe that you can set up so
when the user presses Enter it acts just like Tab, so it follows the tab
order between text boxes in .NET just like you can do in Access. I
personally have never run across something like this, but I am still young in
the .NET Programming world so perhaps I just haven't run across it yet.
Thanks for the help.
 
bh,

It could most definitly be done programatically. I don't know if there is a
config that you can change to set it up as well but I would assume (haven't
tested this) that if you capture one of the key events and set the focus to
the next control in the tab order if the key was the enter key then that
would work.

There is probably a much better way of doing it, but to satisfy if it can be
done or not I would say yes.

HTH,
Steve.
 
Doing this would "change" the basic concepts of your application. Most
windows application has certain behaviors, tab = move to next input box,
enter means execute the default button. You can doing anything you want but
be sure you keep within the boundaries of "how other programs" behave.
 
Thanks for the info. I do know a way of doing it, but I still battle with
how smart it would be do it. Sometimes it is better to just break people of
their bad habits that they developed using such things as Access.
 
This is very much possible I use it all the time with this script

function tabOnEnter (field, evt) {
var keyCode = document.layers ? evt.which : document.all ?
evt.keyCode : evt.keyCode;
if ((keyCode != 13) && (keyCode !=9))
return true;
else {
getNextElement1(field).focus();
return false;
}
}
 
Back
Top