Article

From:
To:
Adalberto Baldini
Subject:
Re: SetFocus not working well
Newsgroup:
embarcadero.public.delphi.language.delphi.win32

Re: SetFocus not working well

> {quote:title=Adalberto Baldini wrote:}{quote}
> I have a form with  :
> 
> ActiveControl = Txt_Username       (TEdit)
> procedure TLogin_dlg.FormShow(Sender: TObject);
> begin
>    txt_username.SetFocus;
> Label5.Caption := ActiveControl.Name;// only for test
> end;
> 

Use ActiveControl instead
   from    txt_username.SetFocus;
   to        ActiveControl := txt_username;
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Sun, 30 Jun 2024 18:15:02 UTC
Copyright © 2009-2024
HREF Tools Corp.