从checkedlistbox c#windows应用程序中获取选定的值 [英] get selected value from checkedlistbox c# windows application
本文介绍了从checkedlistbox c#windows应用程序中获取选定的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hi
我试图获得checklistbox中已检查项目的价值
我的问题是当我使用计时器时每分钟获得价值
需要调用吗?
如何解决这个问题
for ( int i = 0 ; i < ContactsList.Items.Count; i ++)
if (ContactsList.GetItemCheckState (i)== CheckState.Checked)
{
string mobileNo = ContactsList.Invoke( new MethodInvoker( delegate {ContactsList.SelectedValue [i];}));
}
解决方案
为什么不使用 CheckedListBox.SelectedIndexChanged [ ^ ]事件而不是计时器?
hi
I try to get value for checked items in checklistbox
my problem is when I used timer to get value each minutes
invoke required ?
how can I solve this issue
for (int i = 0; i < ContactsList.Items.Count; i++)
if (ContactsList.GetItemCheckState(i) == CheckState.Checked)
{
string mobileNo = ContactsList.Invoke(new MethodInvoker(delegate { ContactsList.SelectedValue[i]; }));
}
解决方案
Why not just use the CheckedListBox.SelectedIndexChanged[^] event instead of a timer?
这篇关于从checkedlistbox c#windows应用程序中获取选定的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文