sencha-SlideView icon indicating copy to clipboard operation
sencha-SlideView copied to clipboard

Update Title on Toolbox

Open raulm3 opened this issue 12 years ago • 4 comments

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());

raulm3 avatar May 21 '13 23:05 raulm3

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.

galacticevil avatar May 22 '13 07:05 galacticevil

I'm trying to do the same (open/close toogle), could you share your code?

Thanx in advanced.

raulm3 avatar May 22 '13 15:05 raulm3

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();
                }

galacticevil avatar May 22 '13 17:05 galacticevil

Tank you very much.

raulm3 avatar May 22 '13 17:05 raulm3