PDA

View Full Version : [AS3] Combobox text cursor


ivy
11-09-2010, 01:26 PM
Hi,
i've a problem with comboBox, here is my code:

private function textchange(e:Event):void{
[...]
debugCombo.dataProvider=new XMLListCollection(list);
debugCombo.selectedIndex=-1;
debugCombo.dropdown.selectedIndex=-1;
debugCombo.open();
debugCombo.text=currTxt;
}

when I write on my combo, dataProvider change, the dropdown list is displayed and what was previously written is put again into the combo.
The problem is that the text is written viceversa...or better, the cursor come back to the begin of the word

I've tryed with:
debugCombo.mx_internal::getTextField().setSelectio n(currTxt.length, currTxt.length);

But it doesn't work.

please help me...