PDA

View Full Version : [INFOREQ] I change the Test code of Toolbar ST 1.0 to ST 2.0 but toolbar is not work ...



leebyeungok
22 Oct 2011, 1:10 AM
Ext.application({ name:'ToolBar Example',

launch: function() {
var count = 0;
var panel = new Ext.create('Ext.Panel',{
fullscreen: true,
html:'<BR><BR><BR><center>About ToolBar<BR>',
dockedItems: [{
xtype: 'toolbar',
dock: 'top',
items:[{
iconCls: 'info',
iconMask: true,
text:'INFOMATION',
},{
iconCls: 'favorites',
iconMask: true,
iconAlign:'top',
text:'INFOMATION',
},]
},{
layout: {
type: 'hbox',
pack: 'center',
},
xtype: 'toolbar',
height:100,
dock: 'bottom',
items:[{

html: '<img src="./img/arrow_left.png" height="70">',
},{

html: '<img src="./img/posol.png" height="70" >',
},]
},{
layout: {
type: 'vbox',
pack: 'center',
},
xtype: 'toolbar',
dock: 'left',
ui:'light',
id:'leftButton',
width:50,
items:[{
text: '<',
handler:function()
{
Ext.getCmp("leftButton").hide();
}
}]
},{
xtype: 'toolbar',
dock: 'right',
ui:'light',
items:[{
text: '>',
handler:function()
{
Ext.getCmp("leftButton").show();
}
}]
}]
});


}
});


left , right toolbar is not work normally....

28799

SunboX
22 Oct 2011, 1:42 AM
First, "Panel" has no "dockedItems" any more. Use "items" config and set "docked" property:
http://cdn.sencha.io/touch/sencha-touch-2.0.0-pr1/docs/#!/api/Ext.Panel-cfg-docked (http://cdn.sencha.io/touch/sencha-touch-2.0.0-pr1/docs/#%21/api/Ext.Panel-cfg-docked)

Second, take a look at "NavigationBar":
http://cdn.sencha.io/touch/sencha-touch-2.0.0-pr1/docs/#!/api/Ext.NavigationBar (http://cdn.sencha.io/touch/sencha-touch-2.0.0-pr1/docs/#%21/api/Ext.NavigationBar)

greetings Sunny

PS: Wrap your code in [ CODE ] ... it´s more readable. ;o)

leebyeungok
22 Oct 2011, 3:28 AM
I used items and docked: 'left' ...... but It's not work....
left and right toolbar's height is not fulled....

Jamie Avins
31 Oct 2011, 11:02 AM
Can you provide an updated test case.