I have hacked up this gorgeous files system tree view that looks like the windows 7 explorer sidebar. Its starts as one control, and that control lives in another control that makes up an "segment" whom are created and added to a host that handles scrolling ect.

I have the control working fine, assuming I rig up the resize event and directoryChanged event of each "segment" to the one handler method that they need to be attached to in the client code. I would really like this to be handled automatically by the host control.

I though that i could expose a collection of items as a property and when they were added to it I could rig up the events ect. I found that I could to this if I write a Addtoitems method and a removefromitems method. But I was hoping for that listview style items collection.

Just using a property I can't get the information I need from the changes made to the collection.

Any ideas?

Edited by Diamonddrake: n/a

6 Years
Discussion Span
Last Post by Diamonddrake

OK, I figured it out. All those other controls use custom collections derived from CollectionBase, this allows you to do customize the add and remove methods of the collection class to do such things as that I mentioned. also its strongly types so I can easily make sure that only my Segment Controls can be added to the view.

Thanks again daniweb for giving me a place to talk to myself until I figure it out...

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.