当前位置:编程学习 > C#/ASP.NET >>

C# 动态改变listbox中选中的值

C#       动态改变listbox中选中的值


在线等等  --------------------编程问答-------------------- 我放置了一个按钮,一个listbox点击按钮的事件。。

        private void button1_Click(object sender, EventArgs e)
        {
            listBox1.Items.Add("123");
            listBox1.Items.Add("234");
        }
--------------------编程问答-------------------- 请问你是做winform还是webform。。 --------------------编程问答-------------------- 请问你是做winform --------------------编程问答-------------------- winform --------------------编程问答-------------------- 我的意思是在listbox中选中了一个值, 然后修改该值,并同时显示出来 --------------------编程问答-------------------- items.add();
items.insert();
items.indexof();
items.findby....
items.remove()
大概都有了,具体看下帮助就知道了. --------------------编程问答-------------------- 谢谢 你的提醒哦  哈哈  对我很有帮助 --------------------编程问答--------------------
引用 6 楼 flyerwing 的回复:
items.add();
items.insert();
items.indexof();
items.findby....
items.remove()
大概都有了,具体看下帮助就知道了.

看错楼主意思了。。 --------------------编程问答-------------------- if (listBox1.SelectedIndex   > =   0) 
listBox1.Items[listBox1.SelectedIndex]=""; 
 
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,