Board index » delphi » Enter key to Tab key in DBGrid

Enter key to Tab key in DBGrid

Between two Editbox an Enter key behave like a Tab key with this code:

   If Key = #13 Then
   begin
    SelectNext(ActiveControl as tWinControl, True, True );
    Key := #0;
   end;

But what do you have to do, if you want a Enter key behave like a Tab key in
a DBGrid.

Thank you in advance for your reply

Joern R.

 

Re:Enter key to Tab key in DBGrid


Quote
J?rn Rasmussen wrote in message <6v7jj5$83...@news.{*word*104}city.dk>...
>But what do you have to do, if you want a Enter key behave like a Tab
key in
>a DBGrid.

Joern,

Try this:
   If Key = #13 Then
   begin
    SelectedIndex := SelectedIndex + 1;
    Key := #0;
   end;

Stephen Brown

Other Threads