3 Replies Latest reply on Jul 5, 2007 1:10 PM by dimival

    ComboBox Length


      I have a comboBox in my form whose data comes from a remoteobject. By default the combobox drops to a certain length and then we have to scroll. How can I change the length of dropdown of the combobox so that the user do not have to scroll. Based on the dataprovider length can I change the length of the dropdown.

        • 1. Re: ComboBox Length
          dimival Level 1
          There's a property named rowCount which is the number of visible rows in your ComboBox's list. So try setting this to a higher value

          <mx:ComboBox dataProvider={someProvider} rowCount="{someProvider.length}"/> //assuming sameProvider is an Array or ArrayCollection

          Hope this works
          • 2. Re: ComboBox Length
            trycold Level 1
            Thanks for the reply. it works somewhat but if I have a combobox on the lower part of app then it does not display all and don't even give me the scrollbar. Is it possible to open the dropdown in the reverse direction. Means instead of going up it goes down or maybe in both directions.

            • 3. ComboBox Length
              dimival Level 1
              Well i think it is possible but you will need to check the ComboBox.as source file (included when you installed Flex) and find wherever it is creating the dropdown list. Then you will need to create a subclass of the ComboBox class and modify that part so the direction is up instead of down.

              EDIT: Ok after reading a bit more, there's an style on the ComboBox named dropDownStyleName whose default value is comboDropDown, so maybe if you modify this it will work. Not sure of which values you can pass to this style, but give it a shoot