怎么样获取checkboxlist中选中的值? 我用的是winform给一张卡片授权我用的是checkboxlist选中某些权限添加, 我想在点击这个授权的卡要显示以前授权过的信息值,也就是在checkboxlist中的值为选中状态。这个 checkboxlist中的selected 在winform 中 貌似没有。?请教了。 谢谢。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 CheckedListBoxcheckedListBox1.SetItemChecked(0, true); 人生如梦,人们因为 贪嗔痴 而迷失自己的本性,沉沦于六道轮回而不能觉之,犹如生活在梦中。wuyq11 能有如此的 人生感叹,这世间像 他这样的人真是难得有。 checkedListBox1.Items.AddRange(new string[] { "one", "two", "three","four" }); checkedListBox1.SetItemChecked(0, true); checkedListBox1.SetItemCheckState(1, CheckState.Indeterminate); checkedListBox1.SetItemCheckState(2, CheckState.Unchecked); if (checkedListBox1.GetItemChecked(0)) { Console.WriteLine("checkedListBox1 one checked."); } if (checkedListBox1.GetItemCheckState(1) == CheckState.Indeterminate) { Console.WriteLine("checkedListBox1 two CheckState is Indeterminate"); } 标准解答:CheckedListBoxcheckedListBox1.SetItemChecked(i, true); i是获取你选中值的索引 请看一下这是什么意思? 怎么在DataGridView中显示以下样子的树型结构 winform改变语言后,窗体布局错乱问题 数据库中读取图片时的错误该如何捕获 对方已经给了我图片的byte[]格式数据,我如何在页面上显示出来??? vs2008自带报表导出excel 调用WIA进行扫描仪操作,WIN7系统正常,XP系统报错 紧急问题 怎样把一个已经打开的窗体激活 高手请进,关于网络编程的问题,up者有分,答对再送100分。 求一本C#设计模式的书 求天轰穿 VS2005教程源代码!
checkedListBox1.SetItemChecked(0, true);
wuyq11 能有如此的 人生感叹,这世间像 他这样的人真是难得有。
checkedListBox1.SetItemChecked(0, true);
checkedListBox1.SetItemCheckState(1, CheckState.Indeterminate);
checkedListBox1.SetItemCheckState(2, CheckState.Unchecked); if (checkedListBox1.GetItemChecked(0))
{
Console.WriteLine("checkedListBox1 one checked.");
} if (checkedListBox1.GetItemCheckState(1) == CheckState.Indeterminate)
{
Console.WriteLine("checkedListBox1 two CheckState is Indeterminate");
}
CheckedListBox
checkedListBox1.SetItemChecked(i, true);
i是获取你选中值的索引