目的: 子視窗, 自動填滿畫面的設定
處理說明 : 1>parent.panel : layout : border
items.panel: region: 1) north/south , 只可設定 Height
items.panel: region: 1) north/south , 只可設定 Height
2) east/west, 只可設定 width
PS: north和south部分只能設置高度(height),
west和east部分只能設置寬度(width)。
center區域必須有,且它的大小是在其他4個部分設置好以後自動計算出來的,
所以不能為它指定寬度值或高度值。
1>*.js
var win = getMyWindow("借閱登記", sub_LendBtn, sub_LendBtn_Btns);
win.width=600;
win.heigh=400;
win.show();
console.log("step6");
win.width=600;
win.heigh=400;
win.show();
console.log("step6");
// [缺勤記錄維護]鈕 - 子畫面欄位
var sub_LendBtn = [
{
type: 'panel', bodyStyle: "background-color:transparent;", border: 0, padding: "5",
flex: 100,
layout: 'border',
items: [
{
xtype: 'panel',
id: 'sub_panel1',
region: 'north',
layout: { type: 'hbox', align: 'stretch' },
items: [
{
xtype: 'panel',
id: 'sub_panel11',
layout: { type: 'vbox', align: 'stretch' },
flex: 15,
border: 0,
items: [{
xtype: "fieldcontainer", fieldLabel: "借閱人員", labelWidth: 60, layout: "hbox", flex: 2,
items: [{
xtype: "textfield", id: "sub_BRP", name: "sub_BRP", width: 100, padding: "0 4 0 0", fieldCls: "required", value:"611292" ,
listeners: {
change: function (textfield, newValue, oldValue) {
if (newValue.length == 10) {
getVcardInfo(newValue);
}
}
}
},
{ xtype: "textfield", id: "sub_BRP_", name: "sub_BRP_", width: 100, padding: "0 4 0 0", readOnly: true, fieldCls: "readonly", },
{
xtype: "button", id: "sub_BRP_btn", name: "sub_BRP_btn", width: 100, padding: "0 4 0 0", text: "借閱人員變更",
handler: function () {
}
},
]
}, // end of s_借閱人員
:
]
}, //end of panel1
{
xtype: 'panel',
id: 'sub_panel2',
region: 'center',
layout: 'fit',
items: [sub_Grid]
},
] // end of layout: "vbox", padding: "5", items: [
} //end of my_Sub2 , items[{
] //end of my_Sub2 , items[