:: Forum >> Version 2 >>

Combo - Selecting an item does not update control image

I have tried the controls.htm example that is included in the 2.0.1 and the combo box item image is not updated when a different item is selected. I have tried this on both Firefox and IE, but neither works correctly.

I tried a few things to explicitly set the control image (see code below), but it doesn't work:

combo.onItemSelectedChanged = function(event, items) { if (event) { this.setControlImage(itemImageArray[items]); }

Please help.

Thanks.
Dan
Dan Bright
Wednesday, October 18, 2006
Apparently, this is a design issue, and Alex has provided me with a solution to my desired behavior:

var combo = new AW.UI.Combo;
combo.setItemText(["Home", "Favorites", "Font size", "Search"]);
combo.setItemImage(["home", "favorites", "fontsize", "search"]);
combo.setItemCount(4);

combo.onSelectedItemsChanged = function(items){
this.setTimeout(function(){
this.setControlImage(this.getItemImage(items[0]));
});
}

Thank you Alex!
Dan Bright
Wednesday, October 25, 2006



This topic is archived.

Back to support forum

Forum search