PDA

View Full Version : toolbar disabled:true property not working for me



BostonMerlin
5 Oct 2011, 7:00 AM
i'm using a simple toolbar with buttons. looking to use the toolbars disabled:true property to disable all the buttons in the toolbar. doesn't work. the only way i can disable the toolbars children is to disable each one. a bug or am i missing something? I would think disabling the parent would disable all children. No?? Thanks JB


xtype: 'toolbar',
ui: 'light',
itemId: 'footerBar',
dock: 'bottom',
disabled: true, //-this does not appear to work, buttons are not disabled. bug??
items:[
{ xtype: 'spacer'},
{ xtype: 'segmentedbutton',
allowDepress: true,
defaults:{style:'cursor:pointer;'}, disabled: true, //-have to do this to disable items
items:[
{ text: 'Overview', pressed: true, id:'view0', },
{ text: 'Holdings', id:'view1', },
{ text: 'Performance', id:'view2', },
{ text: 'Activity', id:'view3', },
{ text: 'Reports', id:'view4', },
{ text: 'Documents', id:'view4', },
],
listeners: {
toggle: function(container, button, pressed){
if (pressed == true){
console.log('pressed');
App.viewport.down('#myview').showView(button.id, 0);
}

//console.log("User toggled the '" + button.id + "' button: " + (pressed ? 'on' : 'off'));
},
},
},
{ xtype: 'spacer'}
],


};