listbox中增加或删除一个item能触发什么事件啊 listbox中增加或删除一个item能触发什么事件啊希望当listbox中item改变时获得一个事件 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 新增和删除这两个操作本身就是你自己程序完成的,至于要想触发什么事件,你在完成操作之后,直接调用即可。而listbox本身不支持新增和删除触发事件。 private void button1_Click(object sender, System.EventArgs e) { this.listBox1.Items.Add("12"); } private void listBox1_CursorChanged(object sender, System.EventArgs e) { MessageBox.Show(this.listBox1.SelectedIndex.ToString()); } private void button2_Click(object sender, System.EventArgs e) { int t=this.listBox1.SelectedIndex; this.listBox1.Items.Remove(this.listBox1.Items[t]); }楼主是这个意思吗??? to新增和删除这两个操作本身就是你自己程序完成的,至于要想触发什么事件,你在完成操作之后,直接调用即可。而listbox本身不支持新增和删除触发事件。恩,后来我想明白了,就是这么做的 请教一个线程池的问题? winform用户控件中添加事件 这个错误在哪里,源文件怎么没这行 页面混乱 vs单选题 C#FTP 类使用 遇到了问题。 为什么画的矩形闪烁,如何解决 请教c的问题,求各路神仙指点 请各位看下,这个mysql调用的异常的原因是什么,要怎么处理。 求C#编小型的系统 c#winform中怎样用命令实现键盘上按"del"键的功能,来删除datagrid中的一行??? C# 我在winform 里面加入的键盘按下事件怎么无效
{
this.listBox1.Items.Add("12");
} private void listBox1_CursorChanged(object sender, System.EventArgs e)
{
MessageBox.Show(this.listBox1.SelectedIndex.ToString());
} private void button2_Click(object sender, System.EventArgs e)
{
int t=this.listBox1.SelectedIndex;
this.listBox1.Items.Remove(this.listBox1.Items[t]);
}楼主是这个意思吗???