NewCodeLearner
NewCodeLearner

Reputation: 738

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;

}

Upvotes: 0

Views: 2688

Answers (1)

Chris Lercher
Chris Lercher

Reputation: 37778

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");

Upvotes: 4

Related Questions