回覆列表
  • 1 # 南風微涼南巷茶色

    jscode:

    functionbulidform(){

    varstore=newext.data.simplestore({

    fields:["id","name"],

    data:[[1,"item1"],[2,"item2"]]

    });

    varform=newext.form.formpanel({

    id:"_form",

    title:"panelforcomboxtest",

    width:300,

    height:150,

    renderto:document.body,

    items:[

    {

    id:"cbitem1",

    xtype:"combo",

    valuefield:"id",

    displayfield:"name",

    emptytext:"請選擇",

    mode:"local",

    value:"",

    store:store,

    triggeraction:"all",

    listeners:{select:function(combox,record,index){

    var_com=ext.getcmp("cbitem2");

    if(!_com.disabled){

    _com.disable();

    }

    }}

    },

    newext.form.combobox({

    valuefield:"id",

    displayfield:"name",

    mode:"local",

    value:"item1",

    store:store,

    id:"cbitem2",

    triggeraction:"all"

    })

    ]

    });

    }

    ext.onready(bulidform);

    ps:emptytext屬性,但下拉框觸發過一次時,便不會再顯示了.

  • 中秋節和大豐收的關聯?
  • 誰能幫我翻譯一下“you are my sunshin”這首歌的歌詞?