Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

How to Move UI button or any element in x and y axis specifically after creation?

$
0
0

//Below script generates Window,Panel with button

//I would like to move button/UI element in x and y axis to desired location

//Could someone please let me know to achieve it?

 

 

 

function myScript(thisObj){

    function myScript_buildUI(thisObj){

       

        var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "tools",undefined ,{resizeable:true});

    

        

          var resAbout="panel{orientation:'row',\

                                          t1:Button{},\

                                           \

                                          \

                                          }";     

                                         

                myPanel.grp=myPanel.add(resAbout);

 

    myPanel.preferredSize=[500,200];

   myPanel.grp.preferredSize=[500,200];

           myPanel.grp.margins=2;

          

 

  

return myPanel;

 

 

}

 

 

var myScriptPal = myScript_buildUI(thisObj);

 

 

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

        myScriptPal.center();

        myScriptPal.show();

    }

 

 

}

 

 

      myScript(this);


Viewing all articles
Browse latest Browse all 2143

Trending Articles