Date: December 21st, 2005 04:29 pm (UTC)From:(Anonymous)
I had this "Too many items in List Box" error when I was adding a set of classes to a checked list box items collection one at a time in a for loop.
The classes I was adding had an override for the ToString property, overridden via a delegate.
One instance of the class returned nothing for the overridden ToString property.
I loaded up the checked list box during form load - no error.
The checked list box was on the second tab page of a tab control & when I clicked on that page hey presto, the error message was displayed ( ie when the overridden ToString sub returned nothing to the checked list box, when the checked list box was trying to display the text for each item in the list, which it does by calling the object's ToString method by default)
This list is still the only resource on the subject, and I found it via Google ;-)
Regards, Graeme ps VB.NET 2003, .NET Framework 1.1 SP1, XP PRo
Too many items in List Box - caused by ToString() override returning nothing
Date: December 21st, 2005 04:29 pm (UTC)From: (Anonymous)The classes I was adding had an override for the ToString property, overridden via a delegate.
One instance of the class returned nothing for the overridden ToString property.
I loaded up the checked list box during form load - no error.
The checked list box was on the second tab page of a tab control & when I clicked on that page hey presto, the error message was displayed ( ie when the overridden ToString sub returned nothing to the checked list box, when the checked list box was trying to display the text for each item in the list, which it does by calling the object's ToString method by default)
This list is still the only resource on the subject, and I found it via Google ;-)
Regards,
Graeme
ps VB.NET 2003, .NET Framework 1.1 SP1, XP PRo