Board index » delphi » TStringGrid - Use ENTER key to navigate down

TStringGrid - Use ENTER key to navigate down

I want to use the ENTER key to go to the cell below the current one in
TStringGrid control. This is similar behavior as in Excel, the ENTER key
behaves like the DOWN key. How can I do this?
 

Re:TStringGrid - Use ENTER key to navigate down


Maybe something like this :

procedure TForm1.StringGrid1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if Key = VK_RETURN then
    begin
      StringGrid1.Row := StringGrid1.Row + 1;
    end;
end;

Quote
"Felix A. Hernandez" wrote:
> I want to use the ENTER key to go to the cell below the current one in
> TStringGrid control. This is similar behavior as in Excel, the ENTER key
> behaves like the DOWN key. How can I do this?

  gge.vcf
< 1K Download

Other Threads