对话框的示例代码弄得乱七八糟 [英] example code of dialog box makes a mess
本文介绍了对话框的示例代码弄得乱七八糟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
函数doGet(){
var app = UiApp.createApplication();
//创建一个对话框。
var dialog = app.createDialogBox();
//在对话框中添加一个标签并设置尺寸和位置。
dialog.setPopupPosition(100,100).setSize(500,500).show();
//显示对话框。请注意,它不必被添加到UiInstance中。
dialog.show();
返回应用程序;
}
部署并得到:
这显然不是我所期望的。
我在做什么错了?
解决方案
别担心, .createDialogBox()
似乎被打破。将您的条目写入问题跟踪器 我将明星它只要您的条目出现在那里。
我使用 PopupPanel
,它能正常工作,并提供相同的功能减可拖动性
I did:
function doGet() {
var app = UiApp.createApplication();
// Create a dialog box.
var dialog = app.createDialogBox();
// Add a label to the dialog and set the dimensions and position.
dialog.setPopupPosition(100, 100).setSize(500, 500).show();
// Show the dialog. Note that it does not have to be "added" to the UiInstance.
dialog.show();
return app;
}
Deployed and got:
This is obviously not what I expected. what am I doing wrong?
解决方案
Don't worry, .createDialogBox()
seems to be broken. Write your entry into the issue tracker I'll star it as soon as your entry shows up there.
I use PopupPanel
which works fine and gives the same functionality minus the draggability
这篇关于对话框的示例代码弄得乱七八糟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文