Is a global TextChanged possible?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My Windows form has over 50 textboxes (in over 10 tabs) and I'd like to know
what textbox data was modified without having to add code to every control's
TextChanged Event. Is it possible for something to monitor all textboxes to
see if any of data changed?

Thanks.
 
The easiest would be to make each textbox's TextChanged event point to the
same code. You only have to write the code once.

You could even write something that would, at initialization time, search
the whole form for textboxes, and make the TextChanged event of all of them
point to your code.

To get started, do a few of them manually and look carefully at the
initialization code that Vis. Studio generates (the section that is normally
unexpanded in the editor).
 
Back
Top