注册 登录
编程论坛 Delphi论坛

求助,光标焦点问题

li8385 发布于 2013-12-17 16:55, 2112 次点击
procedure TForm1.EdtHeightClick(Sender: TObject);
begin
   EdtHeight.setfocus;
end;

然后为什么不行,无法获得焦点?
procedure TForm1.Button0Click(Sender: TObject);
begin

  if EdtHeight.Focused then
  begin
    EdtHeight.Text:= EdtHeight.Text+'0';
    EdtHeight.SelStart := Length(EdtHeight.Text);
  end;
   if EdtWeight.Focused then
   begin
  EdtWeight.Text:= EdtWeight.Text+'0';
  EdtWeight.SelStart := Length(EdtWeight.Text);
   end;
end;
2 回复
#2
wp2319572013-12-20 08:35
gz
#3
volte2013-12-20 13:19
鼠标点击光标都到按钮上了!怎么触发
1