Determing the ordinal position of items in ListBox

S

SamIAm

Hi

I have a ListBox called lstListOfStuff

I want to get the ordinal position of a ListItem so that I can insert a new
ListItem below it. How do I do this? I cannot find any members to give me
the index position of an item?

Thanks,

S
 
A

Andrew de la Harpe

Use the IndexOf property

int indx = ListBox.Items IndexOf(ListBox.Items.FindItemByValue('my_value');
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top