views:

482

answers:

1

If my ComboBox is editable how can I tell if a change event comes from a change to the TextInput or a change in the selectedIndex of the drop down?

Is there a way to check for this in the event object?

+1  A: 

Check the selectedIndex property on the ComboBox--if your change happened in the dropdown list, this will be an index in the list; otherwise it will be -1.

See ComboBox.selectedIndex.

Michael Brewer-Davis
Lets say the user has already made a dropdown change and then edits the textfield. I can hold a reference to the previous selectedIndex for comparison but if I can pull this info from the event, I'd rather do that.
John Leonard
You're right. When you edit the text, the selectedIndex is set to -1. Thanks.
John Leonard