<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/06/11/setting-the-number-of-visible-items-in-a-combobox-controls-dropdown-menu-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="top"
        backgroundColor="white"
        initialize="init();">

    <mx:Script>
        <![CDATA[
            import mx.controls.ComboBox;
            import mx.controls.NumericStepper;
            import mx.containers.ApplicationControlBar;
            import mx.events.NumericStepperEvent;

            private var arr:Array;
            private var appControlBar:ApplicationControlBar;
            private var numericStepper:NumericStepper;
            private var comboBox:ComboBox;

            private function init():void {
                arr = [];
                arr.push({label:"One"});
                arr.push({label:"Two"});
                arr.push({label:"Three"});
                arr.push({label:"Four"});
                arr.push({label:"Five"});
                arr.push({label:"Six"});
                arr.push({label:"Seven"});
                arr.push({label:"Eight"});
                arr.push({label:"Nine"});

                numericStepper = new NumericStepper();
                numericStepper.minimum = 0;
                numericStepper.maximum = 10;
                numericStepper.addEventListener(NumericStepperEvent.CHANGE, numericStepper_change);

                appControlBar = new ApplicationControlBar();
                appControlBar.dock = true;
                appControlBar.addChild(numericStepper);
                Application.application.addChildAt(appControlBar, 0);

                comboBox = new ComboBox();
                comboBox.dataProvider = arr;
                comboBox.rowCount = 5;
                comboBox.width = 100;
                comboBox.setStyle("openDuration", 0);
                comboBox.setStyle("closeDuration", 0);
                addChild(comboBox);
            }

            private function numericStepper_change(evt:NumericStepperEvent):void {
                comboBox.rowCount = evt.value;
                callLater(comboBoxOpen);
            }

            private function comboBoxOpen():void {
                comboBox.open();
            }
        ]]>
    </mx:Script>

</mx:Application>