S subdoing Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-28 #1 在DBGrid中,按ENTER键时,焦点会到下一行,请问如何使其像tab键一样到下一网格。 能否在程序中让焦点在指定的网格上。请各位大侠指点,谢谢啦!!
O only you Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-28 #2 在DBGrid的OnKeyDown事件中写 procedure TForm1.DBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key=VK_RETURN then begin SendMessage(DBGrid1.Handle,WM_KEYDOWN,VK_TAB,0); Key:=0; end; end;
在DBGrid的OnKeyDown事件中写 procedure TForm1.DBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key=VK_RETURN then begin SendMessage(DBGrid1.Handle,WM_KEYDOWN,VK_TAB,0); Key:=0; end; end;
O only you Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-28 #3 到指定的网格上跟这个差不多,你计算出要tab几次就可以了然后 循环用Sendmessage