franklt69
25 Dec 2006, 4:12 PM
Hi I need to change the title in a Boderloyout I did it but don´t work I have a borderlayout, in the west region I have 4 controlpanel I want to show in the titlebar a text different to the text in each contentpanel, how to do it?, I get the event activate for the contentpanel and tried to change the title bar but don´t work what is wrong?
// create the main layout
layout = new YAHOO.ext.BorderLayout(document.body, {
north: {
split:false,
initialSize: 25,
titlebar: false
},
west: {
split:true,
initialSize: 200,
minSize: 175,
maxSize: 400,
tabPosition: 'top',
titlebar: true,
collapsible: true,
animate: true,
autoScroll:true,
useShim:true,
cmargins: {top:0,bottom:2,right:2,left:2}
},
east: {
split:true,
initialSize: 200,
minSize: 175,
maxSize: 400,
titlebar: true,
title: "Firm Center",
collapsible: true,
animate: true,
autoScroll:false,
useShim:true,
collapsed:true,
cmargins: {top:0,bottom:2,right:2,left:2}
},
south: {
split:false,
initialSize: 22,
titlebar: false,
collapsible: false,
animate: false
},
center: {
titlebar: false,
autoScroll:true,
tabPosition: 'top',
closeOnTab: true,
alwaysShowTabs: false,
resizeTabs: true
}
});
layout.beginUpdate();
//header
layout.add('north', new YAHOO.ext.ContentPanel('header'));
//add search
leftMenuFirm = new YAHOO.ext.ContentPanel('firm', {title: 'Firm', fitToFrame:true});
south = layout.getRegion('west');
south.add(leftMenuFirm);
............
.........
leftMenuFirm.on('activate', function(){
layout.titleTextEl = "Firm Center";
//leftMenuFirm.getEl().repaint();
layout.getEl().repaint();
});
I would like to Appear in this ContentPanel Firm and the title bar "Firm Center" is possible to do it?
please any hint
kind regards
Frank
// create the main layout
layout = new YAHOO.ext.BorderLayout(document.body, {
north: {
split:false,
initialSize: 25,
titlebar: false
},
west: {
split:true,
initialSize: 200,
minSize: 175,
maxSize: 400,
tabPosition: 'top',
titlebar: true,
collapsible: true,
animate: true,
autoScroll:true,
useShim:true,
cmargins: {top:0,bottom:2,right:2,left:2}
},
east: {
split:true,
initialSize: 200,
minSize: 175,
maxSize: 400,
titlebar: true,
title: "Firm Center",
collapsible: true,
animate: true,
autoScroll:false,
useShim:true,
collapsed:true,
cmargins: {top:0,bottom:2,right:2,left:2}
},
south: {
split:false,
initialSize: 22,
titlebar: false,
collapsible: false,
animate: false
},
center: {
titlebar: false,
autoScroll:true,
tabPosition: 'top',
closeOnTab: true,
alwaysShowTabs: false,
resizeTabs: true
}
});
layout.beginUpdate();
//header
layout.add('north', new YAHOO.ext.ContentPanel('header'));
//add search
leftMenuFirm = new YAHOO.ext.ContentPanel('firm', {title: 'Firm', fitToFrame:true});
south = layout.getRegion('west');
south.add(leftMenuFirm);
............
.........
leftMenuFirm.on('activate', function(){
layout.titleTextEl = "Firm Center";
//leftMenuFirm.getEl().repaint();
layout.getEl().repaint();
});
I would like to Appear in this ContentPanel Firm and the title bar "Firm Center" is possible to do it?
please any hint
kind regards
Frank