2014-10-07 2 views
0

TabPanel 및 PopUp 위젯을 사용해 보았지만 스타일이 없으면 브라우저에 모두 표시됩니다 ... 인터넷에서 다운로드 한 다른 예제도 괜찮습니다. 무슨 일이야?GWT 위젯은 스타일없이 표시됩니다.

그게 내가 본 것의 예입니다 ... 내가 빠진 것이 무엇입니까? 덕분에 내 코드가 있어요

enter image description here

: 테마가하며 .gwt.xml 파일에 무엇을

..... 
     Button search = Button.wrap(DOM.getElementById("search")); 
     search.setVisible(true); 

     search.addClickHandler(new ClickHandler(){ 
      public void onClick(ClickEvent event) { 
       new MyPopup().show(); 
      }   
     }); 

    } 

     private static class MyPopup extends PopupPanel { 

      public MyPopup() { 
       // PopupPanel's constructor takes 'auto-hide' as its boolean parameter. 
       // If this is set, the panel closes itself automatically when the user 
       // clicks outside of it. 
       super(true); 

       // PopupPanel is a SimplePanel, so you have to set it's widget property to 
       // whatever you want its contents to be. 
       setWidget(new Label("Click outside of this popup to close it")); 
      } 
      } 

답변

1

을 설정? 기본 GWT 스타일 시트가 선택되지 않았다고 가정합니다.

http://www.gwtproject.org/doc/latest/tutorial/style.html

예, 광산은 미 주석 예를 들어 크롬 하나

내가 크롬의 "요소 검사"또는 브라우저 개발자 도구에 내장 된 사용 말할 것
<!-- Inherit the default GWT style sheet. You can change  --> 
    <!-- the theme of your GWT application by uncommenting   --> 
    <!-- any one of the following lines.       --> 
    <!--<inherits name='com.google.gwt.user.theme.standard.Standard'/>--> 
    <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> --> 
    <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>  --> 
<inherits name='com.google.gwt.user.theme.chrome.Chrome'/> 

과거 어떤 CSS 파일이로드되거나 적용되는지 확인하십시오.

+0

감사합니다. 그것은 내 문제를 해결! –

관련 문제