简体   繁体   English

GAS:如何增加滚动面板的尺寸?

[英]GAS: how can I increase the size of the scroll panel?

I've create this scroll panel: 我创建了这个滚动面板:

   var app = UiApp.createApplication();
   var scroll = app.createScrollPanel().setPixelSize(500, 300);
   var panel = app.createVerticalPanel();
   scroll.add(panel);
   app.add(scroll);  
   spreadsheet.show(app);

But I can't get this scroll panel bigger than setPixelSize(500, 300); 但是我不能让这个滚动面板大于setPixelSize(500, 300); because, in this case, the submit button is not shown. 因为在这种情况下,不会显示“ submit按钮。 How can I increase the size of the panel? 如何增加面板尺寸?

Don't forget you can define the size of the uiApp instance itself, it will probably solve your problem... 别忘了您可以定义uiApp实例本身的大小,它可能会解决您的问题...

function myFunction() {
  var spreadsheet = SpreadsheetApp.getActive();
  var app = UiApp.createApplication().setHeight(800).setWidth(1500);
  var scroll = app.createScrollPanel().setPixelSize(500, 300);
  var panel = app.createVerticalPanel();
  scroll.add(panel);
  app.add(scroll);  
  spreadsheet.show(app);
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM