/** * Closes the combox and set the selection which is lost using Flex 3 * * @event Event Trigger event to close the combobox */ override public function close(event:Event = null):void { super.close(event); if(selectedIndex == 0) { // set the text using the selected label textInput.text = selectedLabel; // select the text from typed text position to texts length textInput.setSelection(cursorPosition, textInput.text.length); } }