我有一个 gwt 项目,其中包含两个 Vlayouts(dialogVLeftPanel,dialogVRightPanel)。该 Vlayouts 包含一个树形网格,如下面的代码所示:
/////////// 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);
我想在 Vlayouts 之间放置一个可抵抗的栏,因为我想在我想做的时候改变两个宽度。当我输入该代码时:
userTreeGrid.setShowResizeBar(true);
调整大小栏是可见的,但它在 Vlayout 的底部,只能缩短面板。如果我想让面板更宽 - 它不起作用。我该如何解决我的问题?
感谢您的任何帮助!