0

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.

1
Contributor
1
Reply
8
Views
5 Years
Discussion Span
Last Post by mlesniak
1

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
Votes + Comments
Good :)
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.