简体   繁体   English

C#如何使用代码检查列表框中的选定项目?

[英]C# How do I check a selected item in a listbox using code?

I have a listbox with checkboxes, how do I check the checkbox of the selecteditem? 我有一个带有复选框的列表框,如何选中selecteditem的复选框?

Thanks 谢谢

假定Windows窗体为clb.SetItemChecked(clb.SelectedIndex,true),其中clb是CheckedListBox对象。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何检查C#中未选择ListBox的选定值? - How do I check if selected value of the ListBox is not selected in C#? c#如何获取列表框中的选定项目是否已更改。 ? - c# how do i get check if a selected item in a listbox has changed. ? 如何获取列表框中所选项目的编号(C#) - How do I get the number of the item selected in a listbox (C#) C#如何为列表框中的选定项目运行一些代码? - C# How do I run some code for the selected item in a listbox? C# - 如何找到列表框项的数据库键? - C# - How do I find the database key of a Listbox item? 如何使用Winforms C#获取用户在列表框中选择项目的顺序 - how do I get the order in which user selected Items in Listbox using Winforms c# 如何使用 selenium webdriver C# 检查列表框中是否存在元素/文本 - How do I check if element/text is present in listbox using selenium webdriver C# 使用C#从Windows Phone的列表框中删除所选项目 - Delete selected item from listbox in windowsphone using c# 如何单击一个按钮,该按钮将从ListBox中删除一个项目,而该列表中包含C#中ListBox的信息? - How do I click a button that will remove an item from a ListBox and the List that holds the information for the ListBox in C#? 如何将列表框中的选定项目添加到列表 <string> 在C#中 - how to add the selected item from a listbox to list <string> in c#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM