PDA

View Full Version : Hw to set dynamic toolbar......????



ajainvivek
15 Nov 2011, 11:49 PM
Hi Guys,

I need global toolbar which gets dynamic text....The toolbar needs to b fixed like tab bar in the bottom....Any solution ...



Thanks
Ajain

ajainvivek
16 Nov 2011, 9:52 PM
guys if u wanna set static toolbar with dynamic text.....

First set the toolbar in rootPanel



var toolbar = new Ext.Toolbar();


Then set the content dynamically to the toolbar


//add listener to child panel
listener:({
//while the panel is visually activated
activate:function()
{
toolbar.setTitle('New Title');
}
//if u wanna deactivate the content after traversing to back page then
deactivate:function()
{
toolbar.setTitle('Previous Title');
}
})


Hope its useful for someone who is new 2 sencha touch...


Thanks
Ajain