Kod: Tümünü seç
procedure TForm1.StringGrid1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
Var
Sutun_sayi : Integer;
Satir_sayi : Integer;
begin
Satir_sayi := StringGrid1.RowCount;
Sutun_sayi := StringGrid1.ColCount;
if (Key =VK_RETURN) and (StringGrid1.Col < Sutun_sayi-1) Then
StringGrid1.Col := StringGrid1.Col +1
else
If (Key =VK_RETURN) and
(StringGrid1.Col = Sutun_sayi-1) And
(StringGrid1.Row < Satir_sayi-1) Then
Begin
StringGrid1.Col := 1;
StringGrid1.Row := StringGrid1.Row +1;
End;
end;
Eklemeyi unutmuşum; bu kodun daha kısıtlı halini sanırım delphiturkiye'de daha önce görmüştüm. O kod yalnızca üzerinde bulunulan satır üzerinde sağa doğu hareket etmeyi sağlalıyordu. Kendim ekleme yaptım.