windows listbox

  • Thread starter Thread starter Guest
  • Start date Start date
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()));
 
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
 
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.
 
Back
Top