请教listbox中怎样判断有没有item被选中 在一个listbox中,如果单击一条item,会变成一个蓝条怎样判断这个listbox中有没有被选中的呢如果有多个被选中的,怎么取出他们的参数呢谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 判断是否被选中: if( this.yourlist.SelectedItem == null ) { return; }判断选中几个: if(this.yourList.SelectedItems.Count < 1) { return; }取得被选中的List内容: for( int i = 0; i< this.yourList.SelectedItems.Count; i++) { this.yourList.GetItemText(this.yourList.SelectedItems[i]); } this.yourlist.SelectedItem == null 一个C# 关于ListView控件类的一个小问题 关于Blend4设置menuitem.icon的问题 datagridview 导出excel 问题 请教指点 谁知道这句代码啥意思? 泛型消耗时间问题 序列化和反序列化 急问:CAPICOM的使用问题? 关注~ 谁能介绍一下B/S的一些知识,概念,层次等等 EventLog.WriteEntry 的奇怪问题 udp广播----------如何同时传播文字和图片?
if( this.yourlist.SelectedItem == null )
{
return;
}
判断选中几个:
if(this.yourList.SelectedItems.Count < 1)
{
return;
}取得被选中的List内容:
for( int i = 0; i< this.yourList.SelectedItems.Count; i++)
{
this.yourList.GetItemText(this.yourList.SelectedItems[i]);
}