ENTER Simulation Tab Keyboard in TDBGRID

zhaozj2021-02-11  250

Procedure TForm1.FormKeyPress (Sender: Tobject; Var Key: Char); Begin if key = # 13 帖子# 0; Perform (WM_NEXTDLGCTL, 0, 0); {move to next control} end else if (ActiveControl is TDBGrid) then // in the TDBGrid begin with TDBGrid (ActiveControl) do begin if selectedindex <(fieldcount -1) then / / If it is not the last field selectedIndex: = SELECTEDINDEX 1 ELSE SELECTEDINDEX: = 0; End; end; end;

转载请注明原文地址:https://www.9cbs.com/read-4220.html

New Post(0)