PDA

View Full Version : [AS2] ComboBox Tab Issue - goes blank on lost focus


parkerjax
05-04-2009, 05:11 PM
Hello all,

Has anyone ever experienced a comboBox that goes blank every time you tab out of the box? If I change the combo's to myCombo.writable = true then this stops... but I can't have these cbo's writable because then when I reference the myCombo.value, Flash passes the text to my loadVars instead of the index value (which is essential for other system components).

I'm loading up my combo's with arrays, and then I addItem for each array value. I also have a dataGrid that users click and it populates a bunch of fields for them. For the fields that are combo boxes, I use the command "myCombo.selectedIndex = x;" where 'x' is the value from the database that is passed to myCombo when users click the dataGrid. Using the selectedIndex command changes what the comboBox displays for them, but I think this is causing the blanking out issue.

Any thoughts here? Basically I have to update the comboBox each time a user clicks the dataGrid and I can't have the comboBox go blank if the user is tabbing through all the fields. Thanks in advance for any and all help.

parkerjax
05-04-2009, 05:29 PM
I realized as I was typing in my question that I can workaround the issue using the .writable = true method by referencing myCombo.selectedIndex instead of myCombo.value... but I really don't want to make those comboBoxes writable because then I have to create validators for everything to make sure that users don't type in something that isn't allowed. Plus, there could be other problems that come down the road. It's just really weird that when it blanks everything out when I tab out of the comboBox. When I click in with the mouse and then click elsewhere, everything is fine... just a tabbing issue.