David Liao

为家人活得更好而奋斗!

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

在WINDOWSFORM中,怎樣給COMBOBOX增加VALUE


using System.Collections;

ArrayList list = new ArrayList();
list.Add (
new DictionaryEntry ("1","投诉"));
list.Add (
new DictionaryEntry ("2","举报"));
list.Add (
new DictionaryEntry ("3","建议"));
list.Add (
new DictionaryEntry ("4","表扬"));
list.Add (
new DictionaryEntry ("5","其它"));

cbBoxLeiXing.DataSource 
=list; 
cbBoxLeiXing.DisplayMember 
="Value";
cbBoxLeiXing.ValueMember 
="Key";
posted on 2006-12-15 14:28  David Liao  阅读(360)  评论(1)    收藏  举报