anttihavanko
9 Apr 2011, 11:33 PM
I have combobox which uses loader to query values from server. When data is loaded, I wan't to highlight/select the first item from combobox's listview and not the one which matches user's query.
So if user types 'car' and server returns 'bike' and 'car', it now highlights 'car' (and scrolls listview if item isn't visible). How to select 'bike' item so listview wouldn't scroll?
I tried to add listener to loader's 'load' event but no success.
loader.addListener(Loader.Load, new Listener<LoadEvent>() {
public void handleEvent(LoadEvent be) {
combo.select(0);
}
});
So if user types 'car' and server returns 'bike' and 'car', it now highlights 'car' (and scrolls listview if item isn't visible). How to select 'bike' item so listview wouldn't scroll?
I tried to add listener to loader's 'load' event but no success.
loader.addListener(Loader.Load, new Listener<LoadEvent>() {
public void handleEvent(LoadEvent be) {
combo.select(0);
}
});