1. #1
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,623
    Vote Rating
    331
    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
    Location
    Kansas
    Posts
    1,510
    Vote Rating
    176
    dongryphon has much to be proud of dongryphon has much to be proud of dongryphon has much to be proud of dongryphon has much to be proud of dongryphon has much to be proud of dongryphon has much to be proud of dongryphon has much to be proud of dongryphon has much to be proud of

      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
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

    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
    Location
    Kansas
    Posts
    1,510
    Vote Rating
    176
    dongryphon has much to be proud of dongryphon has much to be proud of dongryphon has much to be proud of dongryphon has much to be proud of dongryphon has much to be proud of dongryphon has much to be proud of dongryphon has much to be proud of dongryphon has much to be proud of

      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
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

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

    "Use the source, Luke!"

Thread Participants: 1