简体   繁体   English

在我的CheckListBox中(从列表顶部开始)哪些项目被选中?

[英]Which items are checkMarked in my CheckListBox (from the top of the list)?

In VB.NET, I can easily use CheckedItems to see that 3 elements are checkMarked in my CheckListBox. 在VB.NET中,我可以轻松地使用CheckedItems来查看CheckListBox中的3个元素为checkMarked。 I loop through 0,1,2 and correctly get the text on each line that is checkMarked. 我遍历0,1,2,并正确获取被选中标记的每一行上的文本。 (With only a small/quick loop of 0-2) (只有一个小/快速循环,为0-2)

But how can I determine those 3 elements are on lines 14,222,1255? 但是,如何确定这3个元素位于第14、222、1255行? (Without looping through 1000s of items.) (不循环浏览数千个项目。)

Thanks 谢谢

Use CheckedIndices instead. 请改用CheckedIndices They'll give you directly line numbers. 他们会直接给您行号。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM