Hello. I have a listbox that I would like to display and I would like to set a default selected item, which I will not be able to determine until run-time. Is it possible to set a default item in the program code?
I have looked at the Index property but that appears to be a read-only property.

I have been able to answer my own question. The ListIndex property of the list box control can be set to the integer value of the list item. For example:-

lstBox.ListIndex = 3
commented: Good :) +14
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.