[英]How to get listbox index
You can use DataGridView instead.您可以改用 DataGridView。
You can add columns (like your time hh:mm) and then get the current selected index time.您可以添加列(例如您的时间 hh:mm),然后获取当前选定的索引时间。 Or you can get the selected index row string and code an algorithm to extract the hh:mm from your string.
或者,您可以获取选定的索引行字符串并编写算法以从字符串中提取 hh:mm。
You could try and create an array with all the items that are inside the listbox, and from there, do whatever you want with it.您可以尝试使用列表框中的所有项目创建一个数组,然后从那里做任何您想做的事情。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.