:: Forum >> Version 2 >>

combo.setControlDisabled()

I am seeing some weird effects with the combo box control. I start out my page with a disabled combo box:
var obj= new AW.UI.Combo;
obj.setId("combo1");
obj.setItemText(function(i){return combo_array[i][0]});
obj.setItemValue(function(i){return combo_array[i][1] + ":" combo_array[i][0]});
obj.setItemCount(combo_array.length);    
obj.setControlDisabled(true);
obj.getContent('box/text').setAttribute('readonly'true); 
obj.onItemClicked = function(eventindex) { 
        if (
index == 0){
            
this.setControlValue("");
        } else {
            
this.setControlValue(this.getItemValue(index));
        }
    }
obj.refresh();
 
Once the page is done loading I am checking a few values to see if I need to re-enable the control. If I do, I set obj.setControlDisabled(false).

This all works great as far as the control going from a greyed out state to a regular state, but for some reason when I then drop down the box after is started as disabled and then went enabled I see a very large white box behind the popup list box.

Is there anything I can do to fix? Some style to add or something?

Thanks
AT
Tuesday, January 20, 2009
By the way, I wanted to also add that I am adding a style to define width and height of the popup
#combo1-popup{
    
width:244px;    
    
height:100px;
}
 
AT
Tuesday, January 20, 2009
Does it happen with AW 2.5.3 or some earlier version?
Alex (ActiveWidgets)
Thursday, January 22, 2009



This topic is archived.

Back to support forum

Forum search