2025年4月14日 星期一

V20305K – 非TLS品項單筆提料 – [搜尋]鈕 - 左靠前一元件 - 置左

 目的: V20305K – TLS品項單筆提料 – [搜尋] - 左靠前一元件

處理說明: 1>alignTo();    左靠 且有offset
                                           Ext.getCmp("sub_btn_Search").alignTo("btn_sub_PN", "tr?", [6, 0]);
                                    
                                  2>element, position, [offsets], [animate] ) 
                                          positon 參數值



1>*.js
Ext.getCmp("sub_btn_Search").alignTo("btn_sub_PN", "tr?", [6, 0]);

//panel11 需求件號                
    var cmp_sub_PN = get_cmp_txt1('需求件號', 'sub_PN', 80, 130);
    var cmp_pick_sub_PN = get_pick_btn0('挑選需求件號', 'btn_sub_PN',
        '../api/V20305KAPI/get_sub_PNPick?isComplete=0&par_PN=' + Tmp_PN,
        ['PN'], ['sub_PN'], J_pickstore_sub_PN, J_pickcolumns_sub_PN);
    cmp_sub_PN.items.push(cmp_pick_sub_PN);

    var cmp_sub_btn_Search = get_cmp_btn1('搜尋', 'sub_btn_Search', 5);  
    
        var sub_V20305K_Flds = [
            {
                type: 'panel', bodyStyle: "background-color:transparent;", border: 5, padding: "1",
                layout: 'border',
                items: [
                    {
                        xtype: 'panel', id: 'sub_panel1', region: 'north', layout: 'hbox',
                        height: 30,
                        items: [
                            {
                     xtype: 'panel', id: 'sub_panel11', layout: { type: 'hbox', align: 'stretch' }, flex: 25, border: 0,
                                items: [cmp_sub_PN, cmp_sub_btn_Search],
                            },  // end of sub_panel11                            
                        ]  //end of sub_panel1.items,
                    },  // end of sub_panel1                        
                    {
                        xtype: 'panel',
                        id: 'sub_panel2',
                        region: 'center',
                        layout: 'fit',
                        //flex: 5,
                        border: 1,
                        items: [sub_Grid]
                    },
                ] // end of   layout: "vbox", padding: "5", items: [
            }  //end of  sub_ShowPN_Flds , items[{
        ]      //end of  var sub_ShowPN_Flds           


沒有留言:

張貼留言