SmartGWT Dialog title not set correctly

心不动则不痛 提交于 2019-12-02 06:57:43

问题


I have a custom dialog that extends the SmartGWT dialog. My problem is that the title and the close button of the dialog aren't displayed in the dialog's title but in the dialog's content under all other elements.

Here is a screeshot:

The bold test and the x button should be in the dialog's title.

My code basically is:

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

Is this a bug in SmartGWT or am I missing something? How can I place the title correctly?

Thanks for any help!


回答1:


There is a problem with your code. You've used

this.addMember(lab);

instead of

this.addItem(lab);


来源:https://stackoverflow.com/questions/5405204/smartgwt-dialog-title-not-set-correctly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!