-
Answered: NavigationView Bar
Answered: NavigationView Bar
How do I add an image to navigationView bar?
This works...
navigationBar : {
layout : 'hbox',
items: [{
xtype: 'button', text : 'melong'
}
]},
But, this doest NOT work
navigationBar : {
layout : 'hbox',
items: [{
xtype: 'image',
src: './resources/images/logo.png'
}
]},
thanks,
-
Best Answer Posted by
mitchellsimoens
The navigation bar isn't that customizable yet. You can add/insert an item to the navigation bar after it has been created.
-
Sencha - Senior Forum Manager
The navigation bar isn't that customizable yet. You can add/insert an item to the navigation bar after it has been created.
-
so i tried to add an image after 'painted' event if I add the button then it works fine.. however, if I add the image then nothing shows up..
Please show me an example.....
somehow I have to the company logo in the center of the nav bar.....
Thank you so much for your help, you already helped me a lot with other issues 
listeners : {
painted : function (nav, eOpts) {
console.log('painted');
var btn = Ext.create('Ext.Button', {
text : 'Ok'
});
var image = Ext.create('Ext.Img', {
src : 'http://www.sencha.com/assets/images/sencha-avatar-64x64.png'
});
nav.getNavigationBar().add(image);
}
}
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us