bagusflyer
29 Dec 2011, 2:10 AM
Have 2 problem: (I set autoCreateViewport to true at my app.js)
1. If I use dockedItems, then the toolbar won't be shown at all. The screen is totally blank
Ext.define('App.view.Viewport', {
extend : 'Ext.Panel',
xtype : 'app-viewport',
config : {
fullscreen : true,
layout : 'card',
dockedItems:
[{
docked: 'top',
xtype:'toolbar',
itemId:'toolbar',
title:APPNAME,
items:
[{
ui:'action',
itemId:LEFTBTN,
},
{ xtype: 'spacer' },
{
ui:'action',
itemId:RIGHTBTN,
}],
}]
}
});
2. If I used Items, then the toolbar title is not in middle
Ext.define('App.view.Viewport', {
extend : 'Ext.Panel',
xtype : 'app-viewport',
config : {
fullscreen : true,
layout : 'card',
items:
[{
xtype : 'toolbar',
docked : 'top',
title : 'ViewPort',
items :
[{
text : 'Back',
ui : 'action',
itemId : LEFTBTN,
// hidden : true
},{xtype:'spacer'},
{
text : 'Back',
ui : 'action',
itemId : RIGHTBTN,
// hidden : true
}]
}]
}
});
Here is the screen shot:
30347
What's wrong with it? Can anybody help? Thanks
1. If I use dockedItems, then the toolbar won't be shown at all. The screen is totally blank
Ext.define('App.view.Viewport', {
extend : 'Ext.Panel',
xtype : 'app-viewport',
config : {
fullscreen : true,
layout : 'card',
dockedItems:
[{
docked: 'top',
xtype:'toolbar',
itemId:'toolbar',
title:APPNAME,
items:
[{
ui:'action',
itemId:LEFTBTN,
},
{ xtype: 'spacer' },
{
ui:'action',
itemId:RIGHTBTN,
}],
}]
}
});
2. If I used Items, then the toolbar title is not in middle
Ext.define('App.view.Viewport', {
extend : 'Ext.Panel',
xtype : 'app-viewport',
config : {
fullscreen : true,
layout : 'card',
items:
[{
xtype : 'toolbar',
docked : 'top',
title : 'ViewPort',
items :
[{
text : 'Back',
ui : 'action',
itemId : LEFTBTN,
// hidden : true
},{xtype:'spacer'},
{
text : 'Back',
ui : 'action',
itemId : RIGHTBTN,
// hidden : true
}]
}]
}
});
Here is the screen shot:
30347
What's wrong with it? Can anybody help? Thanks