您的位置:首页 > Web前端 > JavaScript

EXTJS4 之 toolbar

2015-06-19 10:12 477 查看
 ShortcutxtypeClassDescription
 '->'
tbfill
Ext.toolbar.Fillbegin using the right-justified button container
 '-'
tbseparator
Ext.toolbar.Separatoradd a vertical separator bar between toolbar items
 ' '
tbspacer
Ext.toolbar.Spaceradd horizontal space between elements
Ext.create('Ext.toolbar.Toolbar', {
renderTo: document.body,
width : 500,
items: [
{
// xtype: 'button', // default for Toolbars
text: 'Button'
},
{
xtype: 'splitbutton',
text : 'Split Button'
},
// begin using the right-justified button container
'->', // same as { xtype: 'tbfill' }
{
xtype : 'textfield',
name : 'field1',
emptyText: 'enter search term'
},
// add a vertical separator bar between toolbar items
'-', // same as {xtype: 'tbseparator'} to create Ext.toolbar.Separator
'text 1', // same as {xtype: 'tbtext', text: 'text1'} to create Ext.toolbar.TextItem
{ xtype: 'tbspacer' },// same as ' ' to create Ext.toolbar.Spacer
'text 2',
{ xtype: 'tbspacer', width: 50 }, // add a 50px space
'text 3'
]
});



Ext.create('Ext.panel.Panel', {
title: 'Toolbar Fill Example',
width: 300,
height: 200,
tbar : [
'Item 1',
{ xtype: 'tbfill' },
'Item 2'
],
renderTo: Ext.getBody()
});



 { xtype: 'tbtext', text: 'Sample Text Item' }

Ext.create('Ext.panel.Panel', {
title: 'Panel with TextItem',
width: 300,
height: 200,
tbar: [
{ xtype: 'tbtext', text: 'Sample Text Item' }
],
renderTo: Ext.getBody()
});

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  extjs4 grid EXTJS