Get link Facebook X Pinterest Email Other Apps - June 02, 2013 How to auto focusing textField when application starts? Get link Facebook X Pinterest Email Other Apps Comments JH JangJune 2, 2013 at 9:54 PMprocedure TForm1.OnCreate(Sender: TObject);begin Edit1.SetFocus;end;or Change Edit1.TabOrder property In ObjectInspectorSee : http://docwiki.embarcadero.com/RADStudio/XE4/en/Edit_Tab_OrderReplyDeleteRepliesReplyAndrea RaimondiJune 2, 2013 at 10:26 PMJungHwan Jang I would put that code in the OnShow '-)ReplyDeleteRepliesReplyMartin WienoldJune 2, 2013 at 11:08 PMBefore callingSetFocus, you should always call CanFocus.if Edit1.CanFocus() then Edit1.SetFocus();ReplyDeleteRepliesReplyColin JohnsunJune 3, 2013 at 12:46 AMEither in your OnCreate event, use:Self.ActiveControl := Edit1;Or,Use the property inspector to set the ActiveControl property of your form to the visual control you want to have focus ie. Edit1.ReplyDeleteRepliesReplyAdd commentLoad more... Post a Comment
procedure TForm1.OnCreate(Sender: TObject);
ReplyDeletebegin
Edit1.SetFocus;
end;
or
Change Edit1.TabOrder property In ObjectInspector
See : http://docwiki.embarcadero.com/RADStudio/XE4/en/Edit_Tab_Order
JungHwan Jang I would put that code in the OnShow '-)
ReplyDeleteBefore calling
ReplyDeleteSetFocus, you should always call CanFocus.
if Edit1.CanFocus() then
Edit1.SetFocus();
Either in your OnCreate event, use:
ReplyDeleteSelf.ActiveControl := Edit1;
Or,
Use the property inspector to set the ActiveControl property of your form to the visual control you want to have focus ie. Edit1.