Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to add the same _TextChanged to all?
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
How to add the same _TextChanged to all?
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01444429
Message ID:
01444429
Vues:
104
Hi,

I need to add a code to the event _TextChanged of all controls on the form (e.g. textbox, checkbox, etc.). The code in _TextChanged will call a form method to disable all buttons (as soon as user makes a change to any one of textboxes/checkbox on the form). I know that I can add this method to the base Textbox class which is the parent of all textboxes in the toolbox. But then other forms that do not need the _TextChanged code will have it. And I can "manually" add this method to every textbox on the form but this is a lot of work and maintenance.

Any suggestions of other ways to accomplish this?

TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform