1 Reply Latest reply on Oct 26, 2011 11:38 PM by Marijan Tompa [tomaxxi]

    Listbox - scrolling

    JJ Fulks Level 1

      When populating an empty Listbox element with ListItems the option to scroll vertically does not appear after the number of ListItems become greater in size than the vertical dimension of the list box. Is there a property I'm overlooking that needs to be set in order to make the Listbox scrollable?

       

      Regards,

      J

        • 1. Re: Listbox - scrolling
          Marijan Tompa [tomaxxi] Level 4

          Hi,

           

          You can use revealItem(itemIndex) to scroll list box without selecting the item.

          Also, revealItem() can accept list item string as well.

           

          var mW = new Window ("dialog", "ListBox Test"),
              mL = mW.add ("listbox", [0, 0, 150, 150]);
          for (var i = 0; i < 100; i++)
              mL.add ("item", "List Item " + String (i))
              mL.revealItem (mL.items.length - i/2);
          mW.show ();
          

           

          Hope that helps.

           

          --

          Marijan (tomaxxi)

          http://tomaxxi.com