PDA

View Full Version : TabPanel items change position after window resize



dana.lees
8 Oct 2009, 4:52 AM
Hello,

I am using a TabPanel the following way:



myPanel = new Ext.TabPanel({
activeTab: 0,
region: 'center',
border: false,
title: 'Entities',
layoutOnTabChange: true,
enableTabScroll: true,
resizeTabs: false,
disabled: true,
defaults: { autoScroll: true }
});


I am using checkboxes on my tabs, divided to 3 columns (since I have many):



var uiSectionBody = new Ext.Panel({
border: false,
layout: 'column',
autoWidth: false
});

var uiColumn = new Array(3);

// column panels 1
uiColumn[0] = new Ext.Panel({
border: false,
columnWidth: 0.33333
});

// column panels 2
uiColumn[1] = new Ext.Panel({
border: false,
columnWidth: 0.33333
});

// column panels 3
uiColumn[2] = new Ext.Panel({
border: false,
columnWidth: 0.33333
});

var colCounter = 0;

if (entities != null) {
for (var i_entities = 0, len = entities.length; i_entities < len; i_entities++) {
var ent = entities[i_entities];
if (colCounter == 3)
colCounter = 0;

var uiCheckbox = new Ext.form.Checkbox
({
boxLabel: ent.Name,
value: 'NotAssigned',
id: 'checkbox' + ent.Id
});

currentCol = uiColumn[colCounter++];
currentCol.add(uiCheckbox);

uiSectionBody.add(uiColumn[0]);
uiSectionBody.add(uiColumn[1]);
uiSectionBody.add(uiColumn[2]);
}

myPanel.add(uiSectionBody);

}


The problem is - when opening the window, the columns and checkboxes are displayed properly. Resizing the window to a smaller causes the columns to be tighter (as expected), with the checkbox columns close to 1 another. But, when resizing back to full size window, the columns remain tight and the checkboxes do not spread properly.

What should I do to fix that?

Thank you

Animal
8 Oct 2009, 5:20 AM
My eyes hurt.