Hi, I'm new on VC++ and I'm trying to do a basic Combobox populate.
What I need is that Combobox shows a description with an integer value behind.
So my first try was using a Dictionary but I wasn't able to bind it to the Combobox
This is my code:
Code:
Dictionary<long, String^> time = gcnew Dictionary<long, String^>();
time.Add(1, "One");
time.Add(5, "Five");
time.Add(10, "Ten");
cbTime->DisplayMember = "Value";
cbTime->ValueMember = "Key";
cbTime->DataSource = time;
In C# to acomplish this I must use a BindingSource to adapt the Dictionary, but in VC++ I don't know how to use it.
Well hope you can help me.
Thank you in advance!