在winfrom 里面  的combobox  
我要在combobox输入一个字,能在combobox下拉里面显示对应的数据,,怎么搞啊。

解决方案 »

  1.   

    看ComboBox.AutoCompleteMode及相关属性。
      

  2.   

    lz:在TextChanged事件中来响应:        private void comboBox1_TextChanged(object sender, EventArgs e)
            {
                int index = comboBox1.FindString(comboBox1.Text);
                if (index != -1)
                {
                    comboBox1.DroppedDown = true;
                    comboBox1.SelectedIndex = index;
                }
                else
                    comboBox1.DroppedDown = false;
            }