2012-05-10 73 views
0

我正在使用Gwt,GWT彈出式面板是透明的?

我有一個標籤。在onClick事件中有一個​​,增加了tree。 問題是popupPanel是透明的。

當執行popup.show時,通過popupPanel看到popupPanel後面的panel。如何避免這一點。

. 
    . 
     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

要麼定義背景色 「的DocumentClass,彈出」

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

或者使用

popupPanel.addStyleName("documentClass-PopPup"); 

,而不是

popupPanel.setStyleName("documentClass-PopPup");