checking form for control changes

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

Guest

I was wondering how you could check a form for changes within it's controls
(or possibly what event to program under). For instance, if i have a panel on
a form with a bunch of combo and text box controls in it, how could i call a
method whenever any of the controls (combo or text) changed? I know one
method is to simply put code in the onchanged event of each of the text and
combo boxes but that seems redundant. Is there some kind of way to loop
through the text and combo boxes or is there some kind of overall onchanged
event i could reference?

Thanks for the help
 
You can use the same event handler to handle events from several objects.
The actual object that sent the event is referenced in the sender object of
the
event handler, cast this to the require type and you can do whatever you
want
with the object. Providing that the signature is the same, the event handler
can
be used with both comboboxes and textboxes.

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top