|
-
February 2nd, 2009, 06:47 PM
#1
[RESOLVED] how to set the text property on a checkedlistbox collection
I had read on pages like this
that when adding objects to a CheckedListBox, it takes the .ToString() function of each added object as the text string.
I added instances of SortedDictionary as this
Code:
Friend Class MySortedDictionary
inherits SortedDictionary(Of string, something)
Public Overrides Function ToString() as string
return "I want to show this"
end Function
end Class
...
CheckedListBox1.Items.Add(new MySortedDictionary)
...
So, lets say, I want the text shown near each checkbox to be "I want to show this"
But instead, I are seeing
How is the right way?
(the overriden function ToString() as is never called)
Last edited by Marraco; February 2nd, 2009 at 07:19 PM.
Reason: fixed bugs/misspellings
[Vb.NET 2008 (ex Express)]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|