0

我正在使用 Gwt ,

我有一个标签。在onClickEvent 上有一个PopupPanel, Whretree被添加。问题是它popupPanel是透明的。

popup.show执行的时候,panel后面popupPanel就被看穿了popupPanel。如何避免这种情况。

    .
    .
        lblClass.addClickHandler(new ClickHandler() {
                        public void onClick(ClickEvent event) {
                            getPopupPanel();
                        }
                    });
private PopupPanel getPopupPanel(){

            popupPanel = new PopupPanel();
            popupPanel.setStyleName("documentClass-PopPup");
            int x =lblClass.getAbsoluteLeft();
            int y = lblClass.getAbsoluteTop();
            popupPanel.setPopupPosition(x, y+20);
            popupPanel.add(getCustomPropertiesTree());
            popupPanel.show();

        return popupPanel;
    }

CSS 

.documentClass-PopPup {
    margin: 2px 1px 1px;
    padding: 2px 1px 1px;
    border-top: thick;
    border-right: medium;
    border-bottom: medium;
    border-left: medium;
    font-size: 10pt;
    letter-spacing: normal;

}
4

1 回答 1

4

为“documentClass-PopUp”定义背景颜色

.documentClass-PopPup {
  background-color: white;
}

或使用

popupPanel.addStyleName("documentClass-PopPup");

代替

popupPanel.setStyleName("documentClass-PopPup");
于 2012-05-10T12:18:37.487 回答