2011-03-23 5 views
1

SmartGWT 대화 상자를 확장하는 사용자 지정 대화 상자가 있습니다. 내 문제는 대화 상자의 제목과 닫기 단추가 대화 상자의 제목에는 표시되지 않지만 다른 모든 요소 아래에는 대화 상자의 내용에 표시된다는 것입니다.SmartGWT 대화 상자 제목이 올바르게 설정되지 않았습니다.

Incorrect title placement

굵은 테스트X 버튼은 대화의 제목에 있어야합니다 : 여기

는 screeshot이다.

내 코드는 기본적으로 :

public class MyDialog extends Dialog {  

    public MyDialog() {  
     super(); 

     this.setTitle("test"); 

     this.setShowTitle(true); 
     this.setShowCloseButton(true); 
     this.setShowMaximizeButton(false); 
     this.setShowMaximizeButton(false); 
     this.setShowStatusBar(false);   
     this.setShowShadow(true); 

     this.setWidth("500px"); 
     this.setHeight("300px");    
    } 

    @Override 
    protected void onInit() { 

     Label lab = new Label("test"); 
     this.addMember(lab); 
    } 
} 

이 SmartGWT의 버그인가, 아니면 내가 뭔가를 놓친 거지? 제목을 올바르게 배치하려면 어떻게합니까?

도움 주셔서 감사합니다.

답변

5

코드에 문제가 있습니다. 당신은 신중하게 더 많은 문서를 읽어

this.addMember(lab); 

대신

this.addItem(lab); 
+0

는 감사의를 :) 내가 했어야 사용했습니다 – hage

관련 문제