Enter no DBGrid

Delphi

20/04/2006

Como eu faço para substituir o tab pelo enter em um DBGrid?


Gbrezolini

Gbrezolini

Curtidas 0

Respostas

Paullsoftware

Paullsoftware

20/04/2006

eu faço assim:
if Key = #13 then
if not (ActiveControl is TDBGrid) then
begin
Key := 0;
Perform(WM_NEXTDLGCTL, 0, 0);
end
else if (ActiveControl is TDBGrid) then
with TDBGrid(ActiveControl) do
if selectedindex < (fieldcount -1) then
selectedindex := selectedindex +1

espero ter ajudado :wink:


GOSTEI 0
POSTAR