关于listbox的怪问题请教高手 在删除listboxB的选择项时总是删除该选择项的前一项?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 设置ListBox的AutoPostBack属性为True就可以了。 设置ListBox的AutoPostBack属性为True时选择itemA时就自动跑到itemA-1项 remove(lisbboxB.items[listboxB.selectindex])和remove(listbox.selectitem)都试过了不行 你是这个意思吗?添加===================private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e){ if(!this.comboBox2.Items.Contains(this.comboBox1.SelectedItem)) this.comboBox2.Items.Add(this.comboBox1.SelectedItem);}删除=====================private void button_Click(object sender, System.EventArgs e){ this.comboBox2.Items.Remove(this.comboBox2.SelectedItem);}这段代码在我这里运行很正常啊 关于 webbrowser.navigate 的问题 **********SplitContainer的拆分线能否加一个小箭头,并且能实现小箭头的Click事件.************ C#怎么在日期后面逐渐加一自动生成不同的编号? 日期变编号自动从001开始? 求C#winform皮肤制作原理(最好有代码示例),最详细者得分! winforms做的游戏的问题 求C#无组件上传图片源码 怎么去掉两边的单引号呀 我也来散分吧。哈哈 急!!!!!!!!!!!---在c#中如何把string转化为int 急急急!!!分分分!!!C#怎样继承基类问题? 关于流的问题 如何打印窗体的内容?
===================
private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
if(!this.comboBox2.Items.Contains(this.comboBox1.SelectedItem))
this.comboBox2.Items.Add(this.comboBox1.SelectedItem);
}
删除
=====================
private void button_Click(object sender, System.EventArgs e)
{
this.comboBox2.Items.Remove(this.comboBox2.SelectedItem);
}
这段代码在我这里运行很正常啊