Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select content in TextBox and NumbericUpDown up on entry.
Message
De
04/10/2004 04:44:18
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Select content in TextBox and NumbericUpDown up on entry.
Divers
Thread ID:
00948377
Message ID:
00948377
Vues:
67
Hi,

When a TextBox or NummericUpDown is entered, I want the content to be selected, namely, highlighted. I have the following code in my subclass of a TextBox:

protected override void OnEnter(EventArgs e)
{
this.SelectAll();
base.OnEnter (e);
}

It is not working. I tried the OnGotFocus event too, and failed too. What's wrong?

Also, the NumericUpDown doesn't have a SelectAll() method, what do I do?

Chen
Chen Nan
Répondre
Fil
Voir

Click here to load this message in the networking platform