View Full Version : [FNR] ColumnConfig set resizable to false problem

2 Feb 2011, 2:19 AM
I'm working with GXT 2.1.1 in hosted mode, Win7, FF and IE.
It seems that I cannot disable column resizing.
Analyzing a little bit the GXT code, I found this (ColumnHeader.java):

// find the previous column which is not hidden
int before = activeHdIndex - 1;
for (int i = activeHdIndex; i >= 0; i--) {
if (!cm.isHidden(i)) {
before = i;

Then :

if (x - r.left <= hw && cm.isResizable(activeHdIndex - before)) {
ss.setProperty("cursor", GXT.isSafari ? "e-resize" : "col-resize");
} else if (r.right - x <= hw && cm.isResizable(activeHdIndex)) {
el().setX(r.right - (hw / 2));
ss.setProperty("cursor", GXT.isSafari ? "w-resize" : "col-resize");
} else {
ss.setProperty("cursor", "");

I have two adjacent columns with index 4 and 5 (0 based) that are configured to be not resizable. The problem comes when the mouse cursor moves from column 5 header toward the column 4 header, so (x - r.left <= hw) is true. When debugging, I found that 'activeHdIndex' and 'before' have the same value 5. This is the first thing I don't understand because 'before' should be 4 (previous column which is not hidden).
The second thing I don't understand is why the code is trying to check if the column with index (activeHdIndex - before) is resizable. In my case, it will check if column 0 (or column 1 if before have the value it should have) is resizable or not. I was expecting the check of resizability of column with index 'before' (and not activeHdIndex - before).

Thanks in advance.

13 Sep 2011, 5:11 AM
There was a fix for something like this on the 12th oh may. Can you retest this against the latest version?

15 Sep 2011, 1:24 AM
Haven't tested yet, but indeed, current code seems more logical to me.