if key = vk_return then//设置回车代替tab键 with a do begin if Col=(ColCount-FixedCols) then begin if Row<(RowCount-FixedRows) then begin Row := Row+1; Col := 1; end; if Row=RowCount-FixedRows then begin RowCount:=RowCount+1; Row := Row+1; Col := 1; end; end else Col:=Col+1; end;