Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Title on Toolbox #3

Open
raulm3 opened this issue May 21, 2013 · 4 comments
Open

Update Title on Toolbox #3

raulm3 opened this issue May 21, 2013 · 4 comments

Comments

@raulm3
Copy link

raulm3 commented May 21, 2013

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

@galacticevil
Copy link

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.

@raulm3
Copy link
Author

raulm3 commented May 22, 2013

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

Thanx in advanced.

@galacticevil
Copy link

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

@raulm3
Copy link
Author

raulm3 commented May 22, 2013

Tank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants