List Info

Thread: Placing focus in a textbox




Placing focus in a textbox
user name
2006-10-06 22:13:53
Set the TabIndex of the control you want to have focus to 0,
and check
the tabindices for the other controls are correct.
Also check the TabStop is not false and that there is no
other code that
may be setting focus

> -----Original Message-----
> From: Discussion forum for developers using Windows
Forms to 
> build apps and controls 
> [mailtoOTNET-WI
NFORMSDISCUSS.DEVELOP.COM] On Behalf Of 
> Mont Rothstein
> Sent: 06 October 2006 22:46
> To: DOTNET-WINFORMSDISCUSS.DEVELOP.COM
> Subject: [DOTNET-WINFORMS] Placing focus in a textbox
> 
> I am having trouble placing focus in a TextBox.
> 
> In the Load event I call myTextBox.Focus() however when
the 
> form opens focus is on an (apparently) random button on
the form.
> 
> Does anyone know what I need to do for focus to be a
the 
> TextBox of my choosing when the form displays?
> 
> Thanks,
> -Mont
> 
> 
> 
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )