combobox,

combobox,
天呀,竟然不能像DropDownList那样直接使用键值对的方式用ArrayList就可以了!
    代码可以这样写!
  ArrayList mylist = new ArrayList();
  mylist.Add (new DictionaryEntry ("1","坏"));
  mylist.Add (new DictionaryEntry ("2","不好"));
  comboBox1.DataSource =mylist;
  comboBox1.DisplayMember ="Value";
  comboBox1.ValueMember ="Key";

posted @ 2008-02-21 19:58  拒绝潜水的鱼  阅读(205)  评论(0编辑  收藏  举报