简体   繁体   中英

GWT popup panel is Transparent??

I am using Gwt ,

I have a Label. On the onClick Event there is a PopupPanel , Whre tree is added. the problem is the the popupPanel is transparent.

when the popup.show is executed , the panel behind popupPanel is seen through the popupPanel . How to avoid this.

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

}

Either define a background color for "documentClass-PopUp"

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

Or use

popupPanel.addStyleName("documentClass-PopPup");

instead of

popupPanel.setStyleName("documentClass-PopPup");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM