Update Title on Toolbox
I have panel which change its title dynamically, but when I add that view to mainview (extend: 'Ext.ux.slide.View') the text of my toolbox is not showing. I update the title using this code:
var toolbar = Ext.ComponentQuery.query('toolbar')[0]; toolbar.setTitle(campania_id.toString());
Hi raulm,
The way I handled it in my app was to have a titlebar within each of my views. Each view was an extended component, which included the sliderbar by default (I extended the aforementioned titlebar to include some standard buttons, like an open/close toggle etc) - and within the view's initialize function, set the title there.
Don't know if its the best way to do things, but it worked very well for me. Basically the initialize for each of these views looked like:
initialize: function() {
this.callParent(arguments);
var sliderbar = this.down('sliderbar');
sliderbar.setTitle(this.getName());
}
Hope it helps.
I'm trying to do the same (open/close toogle), could you share your code?
Thanx in advanced.
Hi raulm,
For my slideview component, I gave it an id.
items: [{
xtype: 'slideview',
id: 'mainSlider',
The Slideview component has a public toggleContainer() method, so on my button, I added the following handler:
handler: function(btn) {
Ext.getCmp('mainSlider').toggleContainer();
}
Tank you very much.