Announcement

Collapse
No announcement yet.

ListBox help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ListBox help

    How do I select the next object in a list box?

    This is the situation. A list box is loaded with a list of items. It is currently selected to an item. I would like to be able to do selected.next and selected.previous at a touch of a button.

    Any thought? Thanks

  • #2
    Re: ListBox help

    You will need three actions to accomplish this:

    List Box Object -> Get Selected:
    %SelectedIndex% = ListBoxObject[LB1].GetSelected

    Variable -> Set Value:
    %Select2% = %SelectedIndex% + 1

    List Box Object -> Select:
    ListBoxObject[LB1].Select(%Select2%)

    to change this for a "Previous" button simply change the '+' in the Assign value action to a '-'. Note that you would want to check and make sure that you do not advance to an invalid item in the list. To do this add an IF statement after the "Get Selected".

    Comment


    • #3
      Re: ListBox help

      Adam,

      I figured it out just before you posted your reply. Thanks though. I guess I was not thinking too much when I posted for help. But I guess others may benifit from this.

      Comment

      Working...
      X