ListBox的项,为什么要闪烁啊 我的listBox1添加的项是一个自定义的类对象,然后有个listBox24_SelectedIndex事件,没什么其他特别的可是,键盘上下键选定项时,为什么项老是要闪烁啊,哪位有经验的朋友告知一下 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把你SelectIndexChanged事件代码贴出来 你上下每一次的按键都会触发你的这个listBox24_SelectedIndex事件,你的事件里面也许会Load数据到ListBox中来,这样不停的装载,也许就造成闪烁吧 private void listBox24_SelectedIndexChanged(object sender, EventArgs e) { if (listBox24.SelectedItem == null) return; string s_选定 = (listBox24.SelectedItem as Class_杂七杂八).UserID; Match match = Regex.Match(s_选定, @"(.*[^0-9])\d*方案|(.*[^0-9])"); string s_图形 = match.Groups[1].Value == "" ? match.Groups[2].Value : match.Groups[1].Value; Match match2 = Regex.Match(s_选定, @"(.*)方案|(.*)"); string s_图形2 = match2.Groups[1].Value == "" ? match2.Groups[2].Value : match2.Groups[1].Value; comboBox1.SelectedItem = s_图形; i_ls选定 = (sender as ListBox).SelectedIndex; button1_Click(new List<string>() { s_图形, s_图形2 }, null); //点击,看图 } 我试了一下,用键盘选定要闪,用代码选定就不闪listbox1.SelectedIndex++; 啥原因? WPF中控件显示问题,Z轴显示不对,控件被遮住了 在线急求WINFORM中导出到excel的效率代码 虚拟机打不开了,就解释啊,能挽救吗? C#写入Excel的问题 通过反射,如何给类中属性赋值?属性的类型带有问号 C#问题 请教各位高手,如何能够识别机器安装了googletoolbar,baidutoolbar等软件, reportviewer传值给rdlc 哪位兄弟帮我检查一下代码,kill掉程序执行完后的excel的进程,进程在任务管理器中可查到,谢谢了!!!!! winform中如何获得客户端的IP地址? 怎样根据IP获取对应的网关,并用字符串读取出来? C# visio
{
if (listBox24.SelectedItem == null)
return;
string s_选定 = (listBox24.SelectedItem as Class_杂七杂八).UserID;
Match match = Regex.Match(s_选定, @"(.*[^0-9])\d*方案|(.*[^0-9])");
string s_图形 = match.Groups[1].Value == "" ? match.Groups[2].Value : match.Groups[1].Value;
Match match2 = Regex.Match(s_选定, @"(.*)方案|(.*)");
string s_图形2 = match2.Groups[1].Value == "" ? match2.Groups[2].Value : match2.Groups[1].Value;
comboBox1.SelectedItem = s_图形;
i_ls选定 = (sender as ListBox).SelectedIndex;
button1_Click(new List<string>() { s_图形, s_图形2 }, null); //点击,看图
}
listbox1.SelectedIndex++;
啥原因?