Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving to Next Textbox with Enter
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01291834
Message ID:
01291851
Vues:
6
>Is there a single property setting for Textbox that controls whether Enter (CR) moves to the next control (loses focus)? Right now only Tab moves you to the next control.
>
>Or do I have to code it in the KeyPress event checking for 13?
>
>If I need to code it in Keypress, what command/method do I use to advance it to the next control?
>
>Thank you in advance.

Something like this should work:
private void textBox_KeyPress(object sender, KeyPressEventArgs e)
{
	if (e.KeyChar == (char)Keys.Enter)
	{
		this.SelectNextControl((TextBox)sender, true, true, true, true);
	}
}
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform