SmartGWT对话框标题设置不正确 [英] SmartGWT Dialog title not set correctly
问题描述
我有一个扩展了SmartGWT对话框的自定义对话框。我的问题是对话框的标题和关闭按钮不显示在对话框的标题中,而是显示在对话框的所有其他元素下的内容中。
这是一个screeshot:
粗体测试和 x 按钮应该在对话框的标题中。
我的代码基本上是:
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);
$ b 这是SmartGWT中的一个错误还是我错过了某些东西?如何正确地放置标题?
感谢您的帮助!
解决方案你的代码有问题。您已经使用过
this.addMember(lab);
而不是
THIS.ADDITEM(实验室);
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!
解决方案 There is a problem with your code. You've used
this.addMember(lab);
instead of
this.addItem(lab);
这篇关于SmartGWT对话框标题设置不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!