1. #1
    Ext Premium Member
    Join Date
    Mar 2007
    Posts
    123
    Vote Rating
    0
    x5150 is on a distinguished road

      0  

    Default how to update title of region?

    how to update title of region?


    How do I update the title of my center region?

    var layout = Ext.BorderLayout.create({
    north: {
    margins:{left:3,top:3,right:3,bottom:0},
    panels: [new Ext.ContentPanel('north',{toolbar:tb})],
    initialSize: 50,
    titlebar: true,
    title: 'File Manager'
    },
    center: {
    margins:{left:3,top:0,right:3,bottom:3},
    titlebar: true,
    title: 'Directory Navigation: ' + sid.getValue() + nav,
    panels: [new Ext.GridPanel(grid)]
    }
    }, 'myLayout');

  2. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,137
    Vote Rating
    321
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    layout.getRegion('center').getPanel(0).setTitle('New title')

  3. #3
    Ext Premium Member
    Join Date
    Mar 2007
    Posts
    123
    Vote Rating
    0
    x5150 is on a distinguished road

      0  

    Default


    Thanks that does set the title correctly but how do I refresh the title right after setting it? I tried

    var nav = "some new title";
    layout.beginUpdate();
    var centerP = layout.getRegion('center').getPanel(0);
    centerP.setTitle(nav);
    centerP.refresh();
    layout.endUpdate();

  4. #4
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,137
    Vote Rating
    321
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Hmm, I somehow don't grasp where's problem. Code you've posted is initialization of the layout and you set your title there correctly.

    Code I've posted works afterwards, for example, you can place it to an event handler, wherever.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar