Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Event fires for all collection members when one member triggers?

Status
Not open for further replies.

Zybron

Programmer
Jul 2, 2003
17
US
I have a usercontrol that contains a collection as a list(of <custom class>). Within the collection class for this usercontrol I have a shared event that is raised when a collection member is added to the class. Within the usercontrol class I have an event that is triggered when the collection class' member added event fires. Finally, I have a flow layout panel on a form that contains a collection of these usercontrol objects. When a member is added to the collection of one of the usercontrols, I am seeing the member added event fire for every control in the flow layout panel. I have confirmed that each of the usercontrols in the flow layout panel are indeed unique objects and not some sort of duplicate reference. Any idea why this is happening or where to look to troubleshoot?
 
Can you post the code? Specifically the event handler on the form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top