52,798
社区成员
发帖
与我相关
我的任务
分享
var panel_north = new Ext.form.FormPanel({
// blankText : '部分一致で検索できます',
id: 'panel_north',
labelAlign: 'right',
frame: false,
height: 100,
split: true,
collapsizable: true,
// layout: 'column',
border: false,
defaultType: 'textfield',
items: [{
name: 'country_name',
fieldLabel: '国名',
// anchor: '10%'
}, {
xtype: 'button',
text: '検索',
// anchor: '10%'
//handler
}],
buttons: [{
text: 'OK'}, {
text: 'キャンセル'
}
]
});
var gird_center = new Ext.grid.GridPanel({
width: 200,
id:'gird_center',
height: 100,
border: false,
stripeRows: true,
tbar: new Ext.Toolbar({
text: '国を追加'
},'-',{
text: '編集'
},'-',{
text: '削除'
})
});
function win_country_select(){
var win = new Ext.Window({
renderTo: document.body,
constrainHeader : true,
width: 330,
layout: 'border',
title: '国の選択',
height: 300,
items: [{region: 'north',layout: 'form',width: 100,items:[panel_north]},
{region: 'center',layout: 'fit',items:[gird_center]}]
});
win.show();
};
var panel_north = new Ext.form.FormPanel({
// blankText : '部分一致で検索できます',
id: 'panel_north',
labelAlign: 'right',
frame: false,
height: 100,
split: true,
collapsizable: true,
// layout: 'column',
border: false,
defaultType: 'textfield',
items: [{
name: 'country_name',
fieldLabel: '国名',
// anchor: '10%'
}, {
xtype: 'button',
text: '検索',
// anchor: '10%'
//handler
}],
buttons: [{ text: 'OK'}, { text: 'キャンセル' } ]
});
var gird_center = new Ext.grid.GridPanel({
width: 200,
id:'gird_center',
height: 100,
border: false,
stripeRows: true,
columns: [{header: "aa"}],
store: new Ext.data.Store(),
tbar: new Ext.Toolbar({ text: '国を追加' },'-',{ text: '編集' },'-',{ text: '削除' })
});
var win = new Ext.Window({
//renderTo: document.body,
constrainHeader : true,
width: 330,
layout: 'border',
title: '国の選択',
height: 300,
items: [{
region: 'north',
//layout: 'form',//这里不能加layout
width: "100%",
items:[panel_north]
}, {
region: 'center',
layout: 'fit',
items:[gird_center]
}]
});
win.show();
xtype后面紧跟着如何加入一个按钮