1. #1
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,596
    Vote Rating
    324
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default setTitle on a Collapsed BorderLayout Region

    setTitle on a Collapsed BorderLayout Region


    setTitle doesn't update the title on a collapsed region in a border layout. This works in 4.0.7.

    Code:
    Ext.onReady(function() {
        var count = 1;
    
        var panel = Ext.create('Ext.panel.Panel', {
            height: 200,
            layout: 'border',
            renderTo: Ext.getBody(),
            width: 200,
            items: [
                {
                    region: 'center',
                    items: {
                        text: 'Update',
                        xtype: 'button',
                        handler: function() {
                            Ext.getCmp('west').setTitle('Count: ' + count++);
                        }
                    }
                }, {
                    collapsed: true,
                    collapsible: true,
                    id: 'west',
                    region: 'west',
                    title: 'West',
                    width: 100
                }
            ]
        });
    });

  2. #2
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,350
    Vote Rating
    134
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    Quote Originally Posted by skirtle View Post
    setTitle doesn't update the title on a collapsed region in a border layout. This works in 4.0.7.
    Thanks.

    EXTJSIV-4868
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  3. #3
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,350
    Vote Rating
    134
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    Fix applied.

    Something like this should work around the problem for now:

    PHP Code:
    Ext.define('Ext.patch.PanelSetTitle', {
        
    override'Ext.panel.Panel',

        
    setTitle: function (title) {
            var 
    placeholder this.placeholder;
            if (
    placeholder) {
                
    placeholder.setTitle(title);
            }

            
    this.callParent(arguments);
        }
    }); 
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

Thread Participants: 1