PDA

View Full Version : How to update the panel's title ?



vicent
21 May 2007, 8:00 AM
I have a innerLayout ,and put several gridPanel to it , now I wanna update each gridPanel's title dynamicly ,I have try use mytabPanel[0].titleTextEI.innerHTML = " new title ";
but useless , mytabPannel is the array to keep those gridPanel;
thanks!
the code :
function tt()
{
//mytabPanel[0].titleTextEI.innerHTML = " new title ";
}
for(var i=0;i<7;i++)
{
mytabPanel[i].on('activate',tt);
innerLayout.add('center',mytabPanel[i]);
}
and that has another question , how can I know the panel's title which I click ?
I try
function tt(id)
{
alert(mytabPanel[id].title);
//mytabPanel[0].titleTextEI.innerHTML = " new title ";
}
mytabPanel[i].on('activate',tt(i));
but fireBug show error

vicent
21 May 2007, 6:06 PM
I found the answer the below Link
http://extjs.com/forum/showthread.php?t=6271&highlight=set+title