I created this GUI https://docs.google.com/open?id=0B27WaIUHQGy0UUFwS2dMS2pMUGs using google apps script GUI builder. But when running it on firefox it was totally crap. Flow panel behaves like a horizontal panel. But thats O.K. I can use chromium. But in both browsers only part of GUI shows. What can I do? Please give me suggestions to look for.This is what it looks when running. https://docs.google.com/open?id=0B27WaIUHQGy0Y295VzRpYk91a3M
2 Answers
Yes, you need setWidth and setHeight to make this work.
Regarding the FlowPanel in Firefox, unfortunately Firefox uses a different set of flow rules than any other browser. For example, it flows its own way for widgets that don't have an explicit width and height set than it does for widgets that do. I'd love to fix this but it's a browser level issue that we can't really overcome. I'd recommend opening the GUI Builder in Firefox to see what you can expect, since the same behavior should be present there too.
Comments
I think you should use a 'master panel'(absolute panel) to hold all the other widgets on it and that will fix the Ui window size when rendered. It will be useful anyway to collect data in your callbackElement. Well, at least that is how I do it when I use the GUI builder.
Another option would be to use app.setWidth('pixelsize').setHeigth('pixelsize') with the right size.
EDIT : you're right, the absolute panel doesn't solve it... but the setWidth() does... use it like this :
var app = UiApp.createApplication().setTitle("panel").setWidth('1500').setHeight('600');
var GUI = app.loadComponent('MyGui')
app.add(GUI)