Author Topic: Programmatically set PopupList option.  (Read 1651 times)

wallabie

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 200
    • View Profile
Programmatically set PopupList option.
« on: March 29, 2014, 04:53:12 AM »
How to programmatically select an popupList item?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Programmatically set PopupList option.
« Reply #1 on: March 29, 2014, 06:24:31 AM »
By setting UIPopupList.selection.

wallabie

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 200
    • View Profile
Re: Programmatically set PopupList option.
« Reply #2 on: March 29, 2014, 07:36:42 AM »
I tried selection = 'labelName' and it works.

How then to set the 5th item in the list?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Programmatically set PopupList option.
« Reply #3 on: March 30, 2014, 07:02:53 AM »
popupList.selection = popupList.items[4];