请教一下文本框的使用 我设计的一个界面,有两个文本框,分别是edit1、edit2,一个按钮我想在edit1中输入过内容之后,按回车键,光标移到edit2,请问怎么实现? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在edit1的keypress事件中写if key=#13 then edit2.setfocus; 简单的方法:在Edit1.KeyPressed事件下,判断按键是否为回车键,然后执行 Edit2.Focus 方法。可以查一下以前的帖子,有很多这样的提问。 在editonkeypress中,if key=#13 then edit2.setfocus; 在edit1的onkeypress事件中 if key=#13 then edit1.setfocus; 或 activecontrol:=edit1; 不管你有多少个文本框都可以。if Key = #13 thenbegin SendMessage(this.Handle,WM_NEXTDLGCTL,0,0); Key := 0;end; fastreport 打印报表 图片插入数据库的问题!急呀!在线等 delphi前台流水号如何实现,贴出源代码? 一个SQL语句的问题(在线等,谢谢) 还是utf-8的问题 后天见准GF了,各位狼友给我提点建议好吗?多谢了 请问如何向一个控件发送组合键消息? 为什么www.delphibbs.com 一发粘就出错?? 那有pascal object基础的书,请建议一本。多谢。 怎么和公司毁约? 怎调用windows的计算器; 一个写注册表的代码,大伙进来帮帮忙...
if key=#13 then
edit2.setfocus;
if key=#13 then
edit2.setfocus;
if key=#13 then
edit1.setfocus; 或 activecontrol:=edit1;
if Key = #13 then
begin
SendMessage(this.Handle,WM_NEXTDLGCTL,0,0);
Key := 0;
end;