Winston
Junior Contributor
Hey guys, i've been making my custom control lately, i'm extending from the standard listbox, and providing a Shadowing property that shadows Items, providing my own collection type, i've extended from collection base implemented the actual methods for the custom collection type all fine as well, i've also provided my ListBoxItem type, that's what the custom collection type holds, and i've also implemened a typeconverter for this ListBoxItem. All good code gets generated. Now i've set up all this stuff. Basically in general the DrawItem event that i normally override and provide functionality for, provides the DrawItemEventArgs as a parameter, and i normally am able to retrieve the Index of the current list item being drawn, but right now the issue is, when i add like say 4 - 5 custom ListBoxItem types in my own Shadowed Item property, and when i run the code, the index i retrieve is ONLY -1. What could be the problem?
Thanks Guys.
Thanks Guys.