P pjm99 Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-24 #1 怎样实现edit输入文本后按回车,等于image按钮按一下!
T tsedlinux Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-24 #2 procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if key=VK_return then begin key:=word(#0); image1click(image1); end; end;
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if key=VK_return then begin key:=word(#0); image1click(image1); end; end;
M mlzhou Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-24 #3 在edit的onkeydown事件里写 if key=#13 then imagebuttonclick(sender);
Q qdyoung Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-24 #4 不明白,是要这样吗: procedure TForm1:Edit1KeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then begin BitBtn1.Click; Key := #0; end; end; ----- http://www.8421.org
不明白,是要这样吗: procedure TForm1:Edit1KeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then begin BitBtn1.Click; Key := #0; end; end; ----- http://www.8421.org
P pjm99 Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-24 #5 if key=13 then image2click(sender); 就可以,谢谢大家!