求助,光标焦点问题
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;