用回车键完美模拟TAB键跳转焦点(解决taborder下一个控件not Enabled情况)

  • A+
所属分类:[开发技巧]

procedure Edit1.FormKeyPress(Sender: TObject; var Key: Char);
begin
if(key=#13)then
begin
selectnext(ActiveControl as Twincontrol,true,true);
key:=#0;
end;
end;

SelectNEXT(SENDER AS TWINCONTROL,TRUE,TRUE);

Moves the input focus from the current child control to the next one in the tab order.

void __fastcall SelectNext(TWinControl* CurControl, bool GoForward, bool CheckTabStop);

  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin
广告也精彩
avatar
广告也精彩

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: