Hi All,
Long story short, I have created a ListView type control, using UserControls for the parent control and the ListViewItems. Most the of the control is written and works fine, right up to the point where I tried to replicate the 'Control.Select edItems(0).Inde x' property and the 'SelectedIndexC hanged' event.
Each child object knows its index value, and could pass this value via the SelectedIndexCh anged event (assuming this is how it works in a normal ListView control -- user clicks on an item, and that item fires an event updating the selected index value in the parent object).
How does the child object raise an event in the parent object? I have a feeling this could be done with Delegates, but I'm still learning about their usage.
Thanks for any help
Long story short, I have created a ListView type control, using UserControls for the parent control and the ListViewItems. Most the of the control is written and works fine, right up to the point where I tried to replicate the 'Control.Select edItems(0).Inde x' property and the 'SelectedIndexC hanged' event.
Each child object knows its index value, and could pass this value via the SelectedIndexCh anged event (assuming this is how it works in a normal ListView control -- user clicks on an item, and that item fires an event updating the selected index value in the parent object).
How does the child object raise an event in the parent object? I have a feeling this could be done with Delegates, but I'm still learning about their usage.
Thanks for any help
Comment