0

I'm working on a script that receives a bunch of input from the user to change certain text fields around the document. Given the amount of input I want the user able to change in a single run of the script I've set up a UI using ScriptUI.

UI on script run

In an attempt to make this UI interactive and since one of the options for the CTA area is to have a single long-form CTA I have set up my UI to remove the edittext when "Long CTA" is selected, and add it back in if any other CTA Type is selected.

In order to achieve this though I have to call win.layout.layout(true) which does the unfortunate resizing of all of my panels.

UI after "Long CTA" is selected

and it doesn't return to normal after re-adding my edittext field.

UI after the original selection is chosen again

I'm not familiar with how the .layout() function works on dialog objects or how panel sizing works (all of these panels have preferred and minimum sizes which seem to be ignored). And have had a hard time finding good reference material for explaining these in detail. If anyone is able to provide assistance in maintaining the look of my window it would be greatly appreciated!

  • The code for this is too long to include here, but if any part of it would be helpful, I can grab excerpts of it! – Ryan Walker Dec 18 '18 at 18:17
0

I seem to have resolved this by changing the order of when the objects were added to/removed from the window and adding a few preferredSize's to group elements that only had minimumSize attributes prior.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.