Only one Event per eventhandler?

  • Thread starter Thread starter PeterB
  • Start date Start date
P

PeterB

Can I add two comboBox.SelectedIndexChanged events to a combobox? I.e.

comboBox1.SelectedIndexChanged += new EventHandler(this.Ctrl_DataChanged);
comboBox1.SelectedIndexChanged += new EventHandler(this.comboBox1_SelectedIndexChanged);

Or will only the last/first one be valid? It seems like I can only add one...
 
This should works. And it should run by the order you add the event
handlers.

What did you do in the Ctrl_DataChanged & comboBox1_SelectedIndexChanged to
verify
whether they are executed or not?

Best Regards,
Jan Yeh


"PeterB" <[email protected]> ¦b¶l¥ó ¤¤¼¶¼g...
Can I add two comboBox.SelectedIndexChanged events to a combobox? I.e.

comboBox1.SelectedIndexChanged += new EventHandler(this.Ctrl_DataChanged);
comboBox1.SelectedIndexChanged += new
EventHandler(this.comboBox1_SelectedIndexChanged);

Or will only the last/first one be valid? It seems like I can only add
one...
 
Back
Top