R rmh Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-18 #1 如何使1.dbEdit输入设定长度的字符后跳到下一个dbEdit; 2.使dbEdit输入数据后,按回车跳到下一个dbEdit.
L liuyan Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-18 #2 1. procedure TForm1.DBEdit1KeyPress(Sender: TObject; var Key: Char); begin if length(Dbedit1.Text)>5 then perform(WM_NEXTDLGCTL,0,0); end; 2. procedure TForm1.DBEdit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if key=vk_return then perform(WM_NEXTDLGCTL,0,0); end;
1. procedure TForm1.DBEdit1KeyPress(Sender: TObject; var Key: Char); begin if length(Dbedit1.Text)>5 then perform(WM_NEXTDLGCTL,0,0); end; 2. procedure TForm1.DBEdit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if key=vk_return then perform(WM_NEXTDLGCTL,0,0); end;
L linsb Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-18 #3 增加: procedure TForm1.DBEdit1Click(Sender: TObject); begin DBEdit1.text:=''; end;