Property FormatString for ListBox

T

Tony Johansson

Hello!

Assume I have a collection of items in a ListBox and I want to format these
in a ListBox by using the proprty FormatString
how can I do this.

As I understand this I have to load these into an array or some other
collection and then clear the ListBox and then
add these items with the specified format into the clean ListBox.?

//Tony
 
T

Tony Johansson

Peter Duniho said:
By setting the property to the format string you want passed to each
object's ToString() method.

Obviously, if the object doesn't have a ToString() overload taking a
format string, the format string won't be applied.

Pete

Can you provide a simple example to the usage of FormatString for a ListBox.

//Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top