Expand my Community achievements bar.

Can you select a specific item from a listbox via scripting?

Avatar

Level 2

This seems like it should be easy, but I've spent quite a few hours trying to figure this out, to no avail.  I'm trying to create a button that would automatically select a specific item on a listbox.  I though "selectedIndex" would do the trick, but this seems to only work if the user actually selects a specific item on a listbox.  I'm looking for the opposite effect, where a person will push a button where a specific item on the listbox gets selected.

Any help would be much appreciated...thanks!

1 Reply

Avatar

Level 10

You can use the setItemState method for this purpose.

To select the third item use: