ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Dockable GUI

COW Forums : Adobe After Effects

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Walter Soyka
Re: Dockable GUI
on Dec 1, 2016 at 5:02:12 pm

Oops. It works as a window, not a panel as written above, because I left out the layout call.

Try this:
function myScript(thisObj){
function myScript_buildUI(thisObj){
var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "myScript", undefined, {resizeable:true});
if(myPanel != null){
var res = "group {orientation:'column',\
grp1: Group {orientation:'row',\
RadioButton1: RadioButton{text:'1'},\
RadioButton2: RadioButton{text:'2'},\
},\
grp2: Group {\
finalButton: Button{text:'Make a PIP'}\
}\
}";
myPanel.grp = myPanel.add(res);

myPanel.layout.layout(true);
myPanel.grp.minimumSize = myPanel.grp.size;
myPanel.layout.resize();
myPanel.onResizing = myPanel.onResize = function () {this.layout.resize();}

return myPanel;
}
}

var myPal = myScript_buildUI(thisObj);
if(myPal != null){
if(myPal instanceof Window){
myPal.center();
myPal.show();
}
}

}

myScript(this);


Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Posts IndexRead Thread 


Current Message Thread:





© 2019 CreativeCOW.net All Rights Reserved
[TOP]