cmp_Panel_D121.layout = { type: 'hbox', align: 'stretch', pack: 'center' }; // 水平置中
var cmp_btn_D1211 = get_cmp_btn1(" ", "btn_D1211", 10, "icon-up");
var cmp_btn_D1212 = get_cmp_btn1(" ", "btn_D1212", 10, "icon-down");
cmp_Panel_D121.items.push(cmp_btn_D1211, cmp_btn_D1212); //熟手.上/下移按鈕
//2025/09/24 隱藏原本 Detail & 加入 [人員Panel) *3
var cmp_Panel_D = get_cmp_panel1(300, 100, "Panel_D");
cmp_Panel_D.title = "Panel_D";
var cmp_tabPanel_D1 = get_cmp_tabpanel1("人員挑選");
var cmp_tabPanel_D2 = get_cmp_tabpanel1("裝備挑選");
cmp_Panel_D.layout = { type: 'hbox', align: 'stretch' };
cmp_Panel_D.items.push(cmp_tabPanel_D1, cmp_tabPanel_D2);
cmp_tabPanel_D1.id = "tabPanel_D1";
cmp_tabPanel_D2.id = "tabPanel_D2";
//畫面版面 - 人員挑選
var cmp_Panel_D1 = get_cmp_panel1(300, 100, "Panel_D1"); //人員挑選
cmp_Panel_D1.layout = { type: 'vbox', align: 'stretch' };
var cmp_Panel_D11 = get_cmp_panel1(300, 100, "Panel_D11"); //人員基本檔(AMM_EMP)
var cmp_Panel_D12 = get_cmp_panel1(300, 30, "Panel_D12"); //[往上],[往下]按鈕
var cmp_Panel_D13 = get_cmp_panel1(300, 100, "Panel_D13"); //已挑選人員[熟手], [生手]人員
cmp_Panel_D11.id = 'Panel_D11';
cmp_Panel_D11.layout = 'fit';
cmp_Panel_D121 = get_cmp_panel1(300, 30, "Panel_D121");
cmp_Panel_D122 = get_cmp_panel1(300, 30, "Panel_D122");
cmp_tabPanel_D1.items.push(cmp_Panel_D1);
cmp_Panel_D1.items.push(cmp_Panel_D11, cmp_Panel_D12, cmp_Panel_D13);
cmp_Panel_D12.items.push(cmp_Panel_D121, cmp_Panel_D122); //[熟手]人員.上/下移, [生手]人員.上/下移
//往上往下按鈕
//var cmp_btn_move_left=get_cmp_btn1("往右","btn_move1","","'icon-right'")
cmp_Panel_D121.layout = { type: 'hbox', align: 'stretch', pack: 'center' }; // 水平置中
var cmp_btn_D1211 = get_cmp_btn1(" ", "btn_D1211", 10, "icon-up");
var cmp_btn_D1212 = get_cmp_btn1(" ", "btn_D1212", 10, "icon-down");
cmp_Panel_D121.items.push(cmp_btn_D1211, cmp_btn_D1212); //熟手.上/下移按鈕
cmp_Panel_D122.layout = { type: 'hbox', align: 'stretch', pack: 'center' }; // 水平置中
var cmp_btn_D1221 = get_cmp_btn1(" ", "btn_D1221", 10, "icon-up");
var cmp_btn_D1222 = get_cmp_btn1(" ", "btn_D1222", 10, "icon-down");
cmp_Panel_D122.items.push(cmp_btn_D1221, cmp_btn_D1222); //生手.上/下移按鈕
//cmp_tabPanel_D1.items[0].items.push(cmp_Panel_D11, cmp_Panel_D12, cmp_Panel_D13);
console.log("cmp_tabPanel_D1:", cmp_tabPanel_D1);
console.log("cmp_tabPanel_D1.items[0]:", cmp_tabPanel_D1.items[0]);
//cmp_tabPanel_D1.items[0].tabBar.height = 0;
//cmp_tabPanel_D1.items[0].tabBar.hidden = true;
console.log("Ext.getCmp(tab_D):", Ext.getCmp("tab_D"));
console.log("Ext.getCmp(tabPanel_D1)_0:", Ext.getCmp("tabPanel_D1"));
//Ext.getCmp("tabPanel_D1").setTabVisible(0, false);
//Ext.getCmp("tabPanel_D2").setTabVisible(1, false);
cmp_Panel_D.border = 1;
cmp_Panel_D11.border = 1;
cmp_Panel_D12.border = 1;
cmp_Panel_D13.border = 1;
//Ext.getCmp("tab_D").tabBar = { height: 0, hidden: true }; // 可選,直接隱藏 tabBar
Ext.getCmp("tab_D").tabBar.height = 0;
Ext.getCmp("tab_D").tabBar.hidden = true;
Ext.getCmp("tab_D").add(cmp_Panel_D);
//Ext.getCmp("tab_D").hide();
//2025/09/25 原本Detail 的Tab 設為隱藏
Ext.getCmp("tab_D").setTabVisible(0, false);
Ext.getCmp("tab_D").setTabVisible(1, false);
Ext.getCmp("tab_D").setActiveTab(2);
1.1>利用 pack:'center' - 按鈕置中, 但是 按鈕和按鈕之間沒空間
{ //往上/往下按鈕 -
xtype: 'panel',
id: 'sub_panel3',
height: 60,
split: true,
region: 'south',
layout: { type: 'hbox', align: 'stretch',pack: 'center' },
border: 1,
//title: 'sub_panel3',
items: [
//{ xtype: 'panel', flex: 30, }, //space panel
cmp_sub_btn_DOWN1,
//{ xtype: 'panel', flex: 10, }, //space panel
cmp_sub_btn_UP1,
//{ xtype: 'panel', flex: 50, },//space panel
cmp_sub_btn_DOWN2,
//{ xtype: 'panel', flex: 10, }, //space panel
cmp_sub_btn_UP2,
//{ xtype: 'panel', flex: 20, }, //space panel
cmp_sub_btn_CLOSE,
]
},
1.2>利用 {xtype:'panel' , flex: 30} - 按鈕和按鈕之間有空間
xtype: 'panel',
id: 'sub_panel3',
height: 60,
split: true,
region: 'south',
layout: { type: 'hbox', align: 'stretch', },
border: 1,
//title: 'sub_panel3',
items: [
{ xtype: 'panel', flex: 30, }, //space panel
cmp_sub_btn_DOWN1,
{ xtype: 'panel', flex: 10, }, //space panel
cmp_sub_btn_UP1,
{ xtype: 'panel', flex: 50, },//space panel
cmp_sub_btn_DOWN2,
{ xtype: 'panel', flex: 10, }, //space panel
cmp_sub_btn_UP2,
{ xtype: 'panel', flex: 20, }, //space panel
cmp_sub_btn_CLOSE,
]
},