-
9 Feb 2009 4:01 AM #1
[FIXED] [1.1.4 - 1.2.2] TreeTable Horizontal Scroll works incorrectly
[FIXED] [1.1.4 - 1.2.2] TreeTable Horizontal Scroll works incorrectly
When you resize columns so that they exceed the TreeTable view, the horizontal scrollbar is shown, but it does not work correctly. You can scroll only about 0.5cm right no matter how many columns are not visible. I suppose the area to be scrolled is calculated like this: TreeTable width + vertical scrollbar width. It should include all TreeTable Columns width.
You can check it on http://extjs.com/explorer/#treetable
just resize "Size" column so it is out of the visible area, and try to scroll the horizontal scrollbar.
GXT version : 1.1.4 , 1.2.0 and 1.2.2
Host mode: hosted mode and web mode
Browser and version : IE7 and FF3
Operating System : Windows XP
-
25 Feb 2009 5:49 AM #2
treeTableHorizontalScroll.jpg
This bug still occurs in 1.2.3 . I attach a screenshot to make it easy to understand the bug:
The horizontal scroll is maximum to the right (as the red arrow shows) but the column to the right is not visible.
Are you taking care of it? Or have some quick fix?
Regards.
-
20 Mar 2009 2:57 AM #3
Quick workaround
Quick workaround
Hi all,
I think I got into the same TreeTable issue and I found a workaround: I created my own TreeTableView class extending TreeTableView. I just had to override the resize method. It looks like this :
Then you can give the TreeTable your own view :Code:private class MyTreeTableView extends TreeTableView{ @Override public void resize() { int width = treeTable.getOffsetWidth(); int headerHeight = treeTable.getTableHeader().getOffsetHeight(); int bodyHeight = treeTable.getOffsetHeight() - headerHeight; int bodyWidth = width; if (treeTable.isAutoHeight()) { scrollEl.setHeight("auto"); dataEl.setHeight("auto"); bodyHeight = dataEl.getHeight(); bodyHeight += treeTable.el().getBorderWidth("tb"); } int columnModelWidth = cm.getTotalWidth(); dataEl.setWidth(Math.min(width, columnModelWidth)); treeTable.getTableHeader().setWidth(columnModelWidth); bodyHeight -= treeTable.el().getBorderWidth("tb"); bodyWidth -= treeTable.el().getBorderWidth("lr"); scrollEl.setStyleAttribute("overflowY", "auto"); if (treeTable.getHorizontalScroll()) { scrollEl.setStyleAttribute("overflowX", "auto"); if (columnModelWidth < width) { scrollEl.setStyleAttribute("overflowX", "hidden"); treeTable.getTableHeader().el().setLeft(0); } } if (treeTable.isAutoHeight()) { bodyHeight = -1; } scrollEl.setSize(bodyWidth, bodyHeight); //workaround dataEl.setWidth(columnModelWidth); } }
I hope this might help.Code:TreeTable treeTable = new TreeTable(cm); TreeTableView view = new MyTreeTableView(); treeTable.setView(view);
Regards.
-
20 Mar 2009 4:04 AM #4
Thanks for looking deeper into it.
This issue is still on our list.
-
20 Mar 2009 4:43 AM #5
completing the list.. if you have a tree into a ContentPanel the horizontal scroll appears too...
-
1 Apr 2009 4:28 AM #6
-
7 Apr 2009 4:38 AM #7
Thanks for a fix, and thanks cbertho for a quick workaround.


Reply With Quote