0 Replies Latest reply on Feb 4, 2007 8:21 AM by MelvinLV

    Fitler as you type, combobox

    MelvinLV
      Please help if you can, I have a function that does the filter as you type working, where it scrolls to the postion in the list. But if I arrow down or Enter, it jumps back to the beginning of the list.

      public function positionVendor ():void {

      var txt:String = varVendor.text;
      var srch:String;

      for (var sInt:int;sInt < vendorListArray.length;sInt++) {
      srch = vendorListArray[sInt].label.substr(0,txt.length);
      if (srch.toUpperCase()==txt.toUpperCase()) {
      varVendor.open();
      varVendor.dropdown.scrollToIndex(sInt);
      //varVendor.selectedIndex=sInt;
      break;
      }
      }
      }