Too many items in List Box - caused by ToString() override returning nothing

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



This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

tinyjo: (Default)
Emptied of expectation. Relax.

June 2020

S M T W T F S
 1 23456
78910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Expand Cut Tags

No cut tags
Page generated January 23rd, 2026 01:50 pm
Powered by Dreamwidth Studios

Style Credit