java - smartgwt - 两个相邻面板(vlayouts)不可调整大小

标签 java eclipse web resize smartgwt

我有一个 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的底部,只能缩短面板。如果我想扩大面板 - 这是行不通的。 我该如何解决我的问题?

感谢您的帮助!

最佳答案

您设置了两个 VLayout,因此您需要将 setShowResizeBar(true) 应用于左侧 VLayout,而不是应用于 TreeGrid 因为您真正想要的是能够调整容器的大小。

关于java - smartgwt - 两个相邻面板(vlayouts)不可调整大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12819325/

相关文章:

java - Spring 启动| LifecycleProcessor 未初始化 - 在调用生命周期方法之前调用 'refresh' 异常

java - 如何处理 Selenium Webdriver 中由于服务器响应时间导致的脚本失败?

Java 创建通用对象的映射

java - 默认的eclipse工作目录

javascript - jQuery 触发更改事件不起作用

javascript - 使用 Python 控制 SSL 网站

java - 输入字符或带点的数字时发送垃圾邮件

java - 替代 JPA 提供商(例如 eclipselink)? eclipselink 环境是否特定?

security - 为什么将 CSRF 预防 token 放在 cookie 中很常见?

java - 数据库查询的单元测试