GIS在哪里

 

WinForm中让ComboBox Add 键值对

            ArrayList mylist = new ArrayList();
            mylist.Add(new DictionaryEntry("0", "点图层"));
            mylist.Add(new DictionaryEntry("1", "线图层"));
            mylist.Add(new DictionaryEntry("2", "面图层"));
            SHPType.DataSource = mylist;
            SHPType.DisplayMember = "Value";
            SHPType.ValueMember = "Key"; 


        

         DictionaryEntry Item = (DictionaryEntry)SHPType.SelectedItem;  
          string selecteValue =  Item.Key.ToString();

posted on 2009-08-26 17:14  寻找GIS  阅读(602)  评论(0编辑  收藏  举报

导航