Gwt 删除Portlet组件的边框-java中的Sencha GXT

Gwt 删除Portlet组件的边框-java中的Sencha GXT,gwt,gxt,Gwt,Gxt,我试图删除portlet和面板的边框 下面是我的代码片段 public class TestViewImpl extends ViewImpl implements TestViewPresenter.MyView{ private PortalLayoutContainer portal; @Inject public TestViewImpl (){ portal = new PortalLayoutContainer(1);

我试图删除portlet和面板的边框

下面是我的代码片段

public class TestViewImpl extends ViewImpl implements TestViewPresenter.MyView{

    private PortalLayoutContainer portal;   

    @Inject
    public TestViewImpl (){
          portal = new PortalLayoutContainer(1);

          vp = new VerticalLayoutContainer();

          portal.getElement().getStyle().setBackgroundColor("white");
          portal.setColumnWidth(0, 1);      
          portal.setBorders(false);

          ContentPanel portlet = new Portlet(); 
          portlet.getHeader().setVisible(false);
          portlet.setBorders(false);
          portlet.setBodyBorder(false);
          portlet.add(vp);
          portlet.setResize(true);
          portlet.setBodyStyle("backgroundColor:white;");   
          portal.add(portlet, 0);
但不知何故,边界总是可见的。如何删除边界?请帮忙


提前感谢

有了这些代码,我可以让边框消失(只需对容器实例化做一些小改动)。那些集装箱是从哪里来的?您是否正在使用UI活页夹,如果是,您是否也可以发布该代码

左边的蓝色部分是标题的背景。(隐藏标题隐藏文本)


如果确实需要删除轮廓边框(实际上是背景图像),可以尝试以下操作:

Element e = portlet.getElement().getFirstChildElement();
e.getStyle().setBorderWidth(0, Unit.PX);
以下是结果的屏幕截图:


这并不容易,但这是唯一的方法(据我所知,并且已经尝试过),您需要浏览器上的开发人员工具(即firebug)来进行检查,并预测要获取的元素和要删除的属性。我上面提供的代码只是我们如何删除顶部轮廓边框的示例,其余的您可以自己尝试。Goodluck:-)

您的gxt是什么版本?sencha gxt 3.0.1@the.wizard我尝试了您的代码,并使用开发人员工具(F12)检查结果。边框是一个背景图像,如果我们把它去掉,整个容器就会乱七八糟。你想达到什么目的?也许我可以帮你一些建议。portal=newportallayoutcontainer(1);getElement().getStyle().setBackgroundColor(“白色”);portal.setColumnWidth(0,1);portal.setboorders(false);-->这就是我对PortallYoutContainer所做的。对不起,我不明白…你在哪里创建PortallYoutContainer?请看我原始帖子中更新的代码。我不想看到特定内容面板的任何大纲。