You can make the combo read only by setting the dropdown style to
dropdownlist.
To make it show the item you want you need to use the items collection.
ComboBox.ObjectCollection oc = comboBox1.Items;
iterate through the object collection (youll have to cast to the
required type)
foreach (object o in oc)
{
if ((o as string).CompareTo("mystring") == 0)
{
comboBox1.SelectedItem = o;
}
}
and when you find the item you want set this as the selected item
comboBox1.selectedItem = o;
Hope this helps
On Oct 26, 10:56 am, "C#Newbie" <andmenr...@gmail.comwrote:
So here is my problem, I have a program that i would like to have some
control similar to a combo box. However, I don't want it to be
editable. How can I do this? Also, when my server pass information to
me, i would like to reflect that information in that combo box; in
other words, the information is already in the combo box, i just want
that information showing and highlighted. Is there anyway to do this?