我一直在尝试开始我的一个新的网络应用项目。我想首先使用GAS,UI服务来制作我的主用户界面。
但是在混合成不同类型的面板后,它似乎就不起作用了。
我到底做错了什么。
function doGet() {
var app = UiApp.createApplication();
var westPanel = app.createVerticalPanel()
.add(app.createButton("Button 1"))
.add(app.createButton("Button 2"))
.add(app.createButton("Button 3"));
var centerPanel = app.createVerticalPanel()
.add(app.createHTML('Some Text.....'));
var splitPanel = app.createSplitLayoutPanel()
.addWest(westPanel, 150)
.add(centerPanel)
.setHeight('100%').setWidth('100%');
var tabPanel = app.createDecoratedTabPanel()
.add(splitPanel, 'Finances')
.setHeight('100%').setWidth('100%');
app.add(tabPanel);
return app;
}亲切的问候
发布于 2013-11-02 01:01:41
应用程序脚本UiApp在幕后使用GWT。这里的问题是,SplitLayoutPanel ( GWT布局面板)不适用于TabPanel (非布局面板)。我的理解是,第一个要求的是父母的身高,这反过来又要求孩子的身高。没有人会高兴,而面板也会倒塌。
如果我们在Apps脚本中使用了GWT TabLayoutPanel,那么它将是您的解决方案。但是我们没有,甚至不需要为UiApp在问题跟踪器上请求任何增强,因为他们( Google脚本团队)已经多次声明他们不会为此付出任何努力,因为方法是HtmlService。如果您发现不可行的情况,请使用HtmlServices或不使用Apps脚本。
这里有一个很好的解释为什么这不起作用:gwt ScrollPanel in TabPanel: no vertical scrollbar
https://stackoverflow.com/questions/19729272
复制相似问题