PDA

View Full Version : Size of the buttons changes then renders ok next round.



Elijah
5 May 2010, 7:26 AM
In the code I posted below, this is what is occuring. From the screen I select a link that opens a new Ext.Window. Inside the window is a TabPanel. Inside the tabPanel is the Panel from the code below. Initially the buttons are fine you can read the conten of each button. The very first time you select a button, the size changes and you can no longer read the content of the 3rd button because it gets cut off. When I close the Ext.Window then click the link to open it again, the buttons are now rendered at the larger size as when it resized the first time however now you can read all the content on each button. Any ideas why this occurs and how to correct?



function getBackgrounds(){
var B = new Ext.Panel({
title: 'Background Preference',
tbar: [{
xtype: 'buttongroup',
columns: 5,
title: 'Choose a background',
items: [
{
id: 'bg1',
text: 'BG 1',
scale: 'large',
iconCls: 'add',
iconAlign: 'top',
cls: 'x-btn-as-arrow',
listeners: {'click': setBackground}
},
{
id: 'bg2',
text: 'BG 2',
scale: 'large',
iconCls: 'add',
iconAlign: 'top',
cls: 'x-btn-as-arrow',
listeners: {'click': setBackground}
},
{
id: 'bg3',
text: 'BG 3',
scale: 'large',
iconCls: 'add',
iconAlign: 'top',
cls: 'x-btn-as-arrow',
listeners: {'click': setBackground}
}
]
}]
});
}