I’ve got a gwt project which contains two Vlayouts(dialogVLeftPanel, dialogVRightPanel). That Vlayouts contain a treegrid, like at code below:
/////////// drzewo użytkowników
userViewTree = new Tree();
userViewTree.setModelType(TreeModelType.PARENT);
userViewTree.setIdField("UserViewId");
userViewTree.setParentIdField("ReportsTo");
userViewTree.setNameProperty("Użytkownicy");
userViewTree.setRootValue(1);
userViewTree.setData(userViewData);
TreeGrid userViewTreeGrid = new TreeGrid();
userViewTreeGrid.setHeight(600);
userViewTreeGrid.setWidth(185);
userViewTreeGrid.setShowOpenIcons(false);
userViewTreeGrid.setShowDropIcons(false);
userViewTreeGrid.setClosedIconSuffix("");
userViewTreeGrid.setFields(new TreeGridField("Użytkownicy"));
userViewTreeGrid.setData(userViewTree);
userViewTreeGrid.getData().openAll();
dialogVLeftPanel.addMember(userViewTreeGrid);
///////////////////////////////////////////////////
//////////////drzewo uprawnień/////////////////////
///////////////////////////////////////////////////
Tree userTree = new Tree();
userTree.setModelType(TreeModelType.PARENT);
userTree.setRootValue(1);
userTree.setNameProperty("Uprawnienia");
userTree.setIdField("userId");
userTree.setParentIdField("ReportsTo");
userTree.setOpenProperty("isOpen");
userTree.setData(userData);
final TreeGrid userTreeGrid = new TreeGrid();
userTreeGrid.setHeight(600);
userTreeGrid.setWidth(630);
userTreeGrid.setShowOpenIcons(false);
userTreeGrid.setShowDropIcons(false);
userTreeGrid.setClosedIconSuffix("");
userTreeGrid.setData(userTree);
userTreeGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
userTreeGrid.setFields(new TreeGridField("Uprawnienia"));
userTreeGrid.setShowSelectedStyle(false);
userTreeGrid.setShowPartialSelection(true);
userTreeGrid.setCascadeSelection(true);
dialogVRightPanel.addMember(userTreeGrid);
I wanna put the resisable bar between that Vlayouts, because I wanna change both width when I wish to do it.
When I put that code:
userTreeGrid.setShowResizeBar(true);
The resize bar is visible, but it is on the bottom of Vlayout and can only shorten the panel. If I wanna make wider the panel – it is not working.
How could I solve my problem?
Thank you for any help!
You have set two
VLayoutso you need to applysetShowResizeBar(true)on you leftVLayoutnot to yourTreeGridbecause what you really want is to be able to resize the containers.