I thought C# was hard. Try posting a question in stackoverflow.
I have a listbox and a button in a usercontrol, itself in a tabpage of a tabcontrol, itself on a form. I need to populate the listbox from the form when the button is clicked.
form > tabcontrol > tabpage > usercontrol > listbox & button
So, how do you notify the form that a deeply buried button has been clicked and then fill the listbox from the form (or call the usercontrol from the form to populate the listbox)?
Thank you guys.
Assuming that your question is about WinForms.
For notification: Expose an event on the userControl and link it to the event of the button, form knows it's children.
In your form:
For population: The same pattern, use your user control as a mediator. Add a public method on userControl that will do the listBox population and call it from your form.