:: Forum >>

RC1 Completed UI objects??

Are any of the uncomplete AW.UI objects functional in RC1? Still seems like the examples of say Combobox is not complete? When will these be finished? Just asking.
Tony
Thursday, February 2, 2006
Well I actually found something easy that I could mod to make the Combo box complete enough for me for my needs at the moment.

I needed to have the control image change when the text change in the combo. As default keeps the same image. So I just did an override of the onCurrentItemChanged function in my code and added the line I needed.

var status = new AW.UI.Combo;
status.setId("status");
status.onCurrentItemChanged = function(i){
    
    var text = this.getItemText(i);
// **** Added the next line solved it
    this.setControlImage(this.getItemImage(i));
    this.setControlText(text);

    this.hidePopup();

    var e = this.getContent("box/text").element();

    if (AW.safari) {
        e.innerHTML = text;
    }
    else {
        e.value = text;
        e.select();
    }
    e = null;
};
status.setControlText("Online");
status.setControlImage("online");
status.setItemText(["Online", "Offline"]);
status.setItemImage(["online", "offline"]);
status.setItemCount(2);
Tony
Thursday, February 2, 2006

This topic is archived.


Back to support forum

Forum search