windows listbox

D

Doker

Arne pisze:
How do I add value /text pair item to a listbox on a winform?
that way:
listBox1.ValueMember = "Key"; // set once

listBox1.Items.Add(
new KeyValuePair<string,object>("foo",new object()));
 
D

Doker

Arne pisze:
How do I add value /text pair item to a listbox on a winform?
listBox1.ValueMember = "Key";
listBox1.Items.Add(new
KeyValuePair<string,object>("foo",new object()));

Best regards,
Jarosław Jaskułowski
Åódź, Polska
 
G

Guest

My key is displayed in the listbox, with the code you supplied.
I want the value to be hidden and my text to be displayed.
When someone clicks on the text, I wnt to programmatically retrieve the value.
 

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