我使用GXT(2.6)在我的GWT应用程序的MessageBox .. 我想这下面的代码,以保持关闭的icon..but它不工作与关闭的图标GWT消息框
Messagebox.setclosable(真);
我使用GXT(2.6)在我的GWT应用程序的MessageBox .. 我想这下面的代码,以保持关闭的icon..but它不工作与关闭的图标GWT消息框
Messagebox.setclosable(真);
其在GXT 2.6不固定的错误..我回顾了MessageBox.class警报()函数..
public static Messagebox alert(String title, String msg,
Listener<MessageboxEvent> callback) {
Messagebox box = new Messagebox();
box.setTitle(title);
box.setMessage(msg);
box.callback = callback;
box.setButtons(OK);
box.icon = WARNING;
box.show();
return box;
}
如果再加box.setClosable(真);这在现有的方法中它会正常工作
公共静态消息框警报(字符串名称,弦乐味精, 监听器回调){ 消息框箱=新的消息框(); box.setTitle(title); box.setMessage(msg); box.callback = callback; box.setButtons(OK); box.icon =警告; box.setClosable(true); box.show();
return box;
}
的bug?: http://www.sencha.com/forum/showthread.php?50995-FIXED-Bug-in-MessageBox.setClosable%28true%29
你也可以很容易地建立一个自定义组件具有与“关闭”按钮,如弹出窗口:
public class EnhancedDialogBox extends DialogBox {
public EnhancedDialogBox(String header, String text){
setText(header);
FlowPanel fp = new FlowPanel();
Button ok = new Button("Close");
ok.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
EnhancedDialogBox.this.hide();
}
});
Label lbl = new Label(text);
fp.add(lbl);
fp.add(ok);
add(fp);
}
}
在急需或情况一个快速和肮脏的修复或解决方法。
嗨阿布杜尔,你可以检查这是一个错误还是修复/解决方法?谢谢。 – Diego 2014-09-02 13:40:50