Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Numeric Input
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
01156834
Message ID:
01158463
Vues:
31
>I am currently correcting lowere case characters with TO Upper on RETURN key
>
>My client wants it converted as it goes in
>
>Some code I tried UPPERS the previous input which is OK but then adds the new input at the beinning!!!
>
>R

did you try this code
private void textBox1_TextChanged(object sender, EventArgs e)
{
  ((TextBox)sender).Text = ((TextBox)sender).Text.ToUpper();
  ((TextBox)sender).SelectionStart = ((TextBox)sender).Text.Length;
}
the 2nd line (((TextBox)sender).SelectionStart = ((TextBox)sender).Text.Length;)moves the cursor to the end.
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform