SelectedItem "Key" is no more in .NET
Posted on 2003-11-26
Hi, when using a TreeView, ListView, ListBox, TabControl in VB6 there used to be a Key property associated with each sub-item such a a node, listitem, tab etc. This seems to have been lost in .NET. For example, if I have a TabControl, the collection of TabPages don't appear to have a unique property such as a key whereby they are accesible. I've done a little research on this and I've read of a few utilising the Tag Property of such items but this doesn't feel right. Surely they haven't overlooked this feature? Also, when adding a "new" item, again a new TabPage to a TabControl for example, the old syntax used to allow you to define all arguments in a single line i.e
MyTabCtrl.Tabs.Add "Text", "Key", "Image" or similar to that effect. This also seems to have gone. Items can't be added to a parent without writing the routine yourself.
Am I overlooking something here?