Home > database >  How to get listbox index
How to get listbox index

Time:11-22

This is an item on my listbox, after I press a button it adds this to my listbox and I want to get the hh:mm index (10:58) but I think this only has one index that is the hole item, any help pls? Thanks Listbox item image

CodePudding user response:

You can use DataGridView instead and then you can add columns (like your time hh:mm) and then get the current selected index time or you can get selected index row string and code an algorithm to extract the hh:mm from your string

CodePudding user response:

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.

  •  Tags:  
  • c#
  • Related