在win_form中如何显示listBox中的多选的内容 来这儿看看:http://www.c-sharpcorner.com/winforms/ListBoxDA001.asp 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用代码改一下所选行的brush颜色,用的时候按颜色区分是否选中! 我看了一下,选定单个用下面的应该可以,nSelectedIndex = this.listbox.SelectedIndex; string szSelected = (string)this.listbox.SelectedItem; this.textbox.Text = szSelected; 但是多个选项应该如何做。比如我写了下面的代码int index = listBox1.SelectedIndex;if (index != 0) {for (int selectIndex = 0; selectIndex<listBox1.Items.Count; selectIndex++) {label1.Text=listBox1.SelectedIndex.ToString();if(listBox1.Items[])//在这里我不知如何写,怎样表明哪行被选定了呢。是不是哪个属性为true????????{listBox2.Add(listBox1.SelectedItem);}} help me 关于winform 打印格式问题 winform 单实例启动程序 asp.net 2.0 (c#)关于定时提醒的功能 给小弟点建议 谢谢 科学记数法转换为int的问题,在线等,答对即给分 C#.net 水晶报表问题 数据显示不对~ 帮忙解决送100分~~~ WPF,自定义转换器,如何传递一个对象 C#连接access数据库 自写一个网站发布的exe 如何将我的程序变成三层结构的??? vc#.net求救 请问如何判定DBNull的存在? 请问我怎样才能知道一台远程主机的所有用户名?
nSelectedIndex = this.listbox.SelectedIndex;
string szSelected = (string)this.listbox.SelectedItem;
this.textbox.Text = szSelected;
但是多个选项应该如何做。
比如我写了下面的代码
int index = listBox1.SelectedIndex;
if (index != 0)
{
for (int selectIndex = 0; selectIndex<listBox1.Items.Count; selectIndex++)
{
label1.Text=listBox1.SelectedIndex.ToString();
if(listBox1.Items[])//在这里我不知如何写,怎样表明哪行被选定了呢。是不是哪个属性为true????????
{
listBox2.Add(listBox1.SelectedItem);
}
}
help me