Skip to main content
Nathan Lovell_52
Inspiring
September 24, 2015
Answered

Dockable Script Size Problem

  • September 24, 2015
  • 1 reply
  • 360 views

I have this simple script here and the bounds are not working for the window size. I would also like to make the long text at the bottom move a line down at a certain length so that the window is not super long. Any suggestions?

{

  function myScript(thisObj){

      function myScript_buildUI(thisObj){

         var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "Script Size Problems", [400, 350, 500, 500], {resizeable:true});

        

         res = "group{orientation:'column',\

          groupOne: Group{orientation:'row',\

          titleText: StaticText{text:'Title Text'},\

          },\

          groupTwo: Group{orientation:'row',\

          effectText: StaticText{text:'More Random Text'},\

          },\

          groupThree: Group{orientation:'row',\

          lorumIpsumText: StaticText{text:'Hey, this is a long sentence that I hope I can make into several lines instead of one long window. Here are more words to drag out the amount of sentence on this, English is a language blah blah blah'},\

          },\

         }";

         myPanel.grp = myPanel.add(res);

        

       

        

         myPanel.layout.layout(true);

        

         return myPanel;

               }

  

      var myScriptPal = myScript_buildUI(thisObj);

      if (myScriptPal != null && myScriptPal instanceof Window){

         myScriptPal.center();

         myScriptPal.show();

      }

   }

   myScript(this);

}

This topic has been closed for replies.
Correct answer David Torno

‌Dockable scripts do not use the bounds option since the code gets placed into a panel to be used and resized in the AE interface. Those bounds would only take effect if your script was launched from the Scripts menu and not the Window menu. At which point it would launch as a floating window and then adhere to your bounds settings.

For the StaticText, you can add the StaticText property "multiline:true".

lorumIpsumText: StaticText{text:'YOUR LONG TEXT', properties:{multiline:true}},\

This will then wrap your text based on the width of the container.

1 reply

David TornoCorrect answer
Legend
September 24, 2015

‌Dockable scripts do not use the bounds option since the code gets placed into a panel to be used and resized in the AE interface. Those bounds would only take effect if your script was launched from the Scripts menu and not the Window menu. At which point it would launch as a floating window and then adhere to your bounds settings.

For the StaticText, you can add the StaticText property "multiline:true".

lorumIpsumText: StaticText{text:'YOUR LONG TEXT', properties:{multiline:true}},\

This will then wrap your text based on the width of the container.