Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google apps script 设置从电子表格显示的UI的大小_Google Apps Script - Fatal编程技术网

Google apps script 设置从电子表格显示的UI的大小

Google apps script 设置从电子表格显示的UI的大小,google-apps-script,Google Apps Script,下面的代码 function doGet() { var app = UiApp.createApplication(); app.add(app.createHTML("<b>Hello World!</b>")); var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); app.setWidth(100); spreadsheet.show(app); } 即使说.setWi

下面的代码

function doGet() {
   var app = UiApp.createApplication();
   app.add(app.createHTML("<b>Hello World!</b>"));
   var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
   app.setWidth(100);
   spreadsheet.show(app);
  }
即使说
.setWidth
方法接受百分比值,我也会得到一个错误。
此外,我想知道是否有可能将其垂直位置锚定到浏览器窗口的顶部或底部,从而使UI容器的垂直位置不居中

我认为您混淆了和小部件宽度,上面说“以像素为单位”

至于其他人,答案是否定的。。。对不起-/

但是你最终可以通过手动拖动来移动UI应用程序,你应该添加一个标题来“抓住标题”

  app.setWidth("100%");