[SOLVED]Combobox getSelectedItem
Posted: Sun Oct 11, 2009 22:50
Hi all!
I'm not sure if this is a bug or a feature. I have a combobox with various items and a method that is called every frame which takes the selected item of the combobox and uses it to calculate stuff. The getSelectedItem function appears to be returning the correct value when the combobox is not expanded. When it is, it will return whatever is under the mouse at that time or nothing if the mouse is not over any item.
So if I have A, B and C in my combobox, select A, expand the list and put the mouse over B without clicking, getSelectedItem will return B. Is this the correct behavior?
I'm not sure if this is a bug or a feature. I have a combobox with various items and a method that is called every frame which takes the selected item of the combobox and uses it to calculate stuff. The getSelectedItem function appears to be returning the correct value when the combobox is not expanded. When it is, it will return whatever is under the mouse at that time or nothing if the mouse is not over any item.
So if I have A, B and C in my combobox, select A, expand the list and put the mouse over B without clicking, getSelectedItem will return B. Is this the correct behavior?