Skip to main content
Participant
June 26, 2008
Answered

How can I select an item from a list component with a seperate button

  • June 26, 2008
  • 1 reply
  • 188 views
This is a repost, I decided it'd probably be better here than in the general discussion board. I will try to delete the other one.

Hello Everyone,
This is my first post here. I am trying to figure out how to select an item within a list component with a button. This button is calling a function. I have searched for the past 3 hours online and I can't find anything about it. I thought perhaps I could set the selectedItem parameter, but that is read only, and I believe it returns an object reference rather than something like a number so even if i could set it, it would be pointless. I also found a get focus button, thought that may lead me somewhere, but I think that is for setting which component has focus currently as far as typing in and things like that. I am lost.

Basically I am looking for a way to type this myList.setSelected(5); where 5 is the 5th item in the list.

Any help would be much appreciated.
This topic has been closed for replies.
Correct answer rxbanditboy1


Never mind found it. It is the property called selectedIndex and it is writable

1 reply

rxbanditboy1AuthorCorrect answer
Participant
June 26, 2008


Never mind found it. It is the property called selectedIndex and it is writable