PDA

View Full Version : How can I update the bladeText of a panel?



Applelunatic
1 Oct 2010, 4:40 AM
How can I update the bladeText of a running program? My code:

var toptabpanel = new Ext.Panel({
title: 'Map',
badgeText: msgsize,
iconCls: 'search',
cls: 'card1',
fullscreen: true,
dockedItems: [toolbar],
items:[mapmain]
});

"msgsize" is global an will be updated correctly, but the bladgeText is still zero. :-(

Thanks for Help!

steve1964
1 Oct 2010, 4:54 AM
badgeText is for Buttons not for Panels...

Applelunatic
3 Oct 2010, 10:53 PM
But why is it working? Just updating is not possible.

var toptabpanel = new Ext.Panel({
title: 'Map',
badgeText: msgsize,
iconCls: 'search',
cls: 'card1',
fullscreen: true,
dockedItems: [toolbar],
items:[mapmain]
});




var tabpanel = new Ext.TabPanel({
tabBar: {
dock: 'bottom',
layout: {
pack: 'center'
}
},
fullscreen: true,
ui: 'light',
animation: {
type: 'cardslide',
cover: true
},

defaults: {
scroll: 'vertical'
},

items: [
toptabpanel
, {
title: 'User',
html: '<h1>User Card</h1>',
cls: 'card2',
iconCls: 'user'
},
{
title: 'Info',
html: '<h1>bla-bla</h1>',
cls: 'card4',
iconCls: 'info'
}]
});

Applelunatic
3 Oct 2010, 10:54 PM
Thanks! But why is it working? Just updating is not possible...

var toptabpanel = new Ext.Panel({
title: 'Map',
badgeText: msgsize,
iconCls: 'search',
cls: 'card1',
fullscreen: true,
dockedItems: [toolbar],
items:[mapmain]
});




var tabpanel = new Ext.TabPanel({
tabBar: {
dock: 'bottom',
layout: {
pack: 'center'
}
},
fullscreen: true,
ui: 'light',
animation: {
type: 'cardslide',
cover: true
},

defaults: {
scroll: 'vertical'
},

items: [
toptabpanel
, {
title: 'User',
html: '<h1>User Card</h1>',
cls: 'card2',
iconCls: 'user'
},
{
title: 'Info',
html: '<h1>bla-bal</h1>',
cls: 'card4',
iconCls: 'info'
}]
});