Xavier, your method worked just fine. But once again, the problem I found was that I must define the exact coordinates of the elements, because if I don’t, after effects doesn’t know where to put the UI stuff.
I don’t know if that is a problem that could be solved with alignment code like “row”,”center”… the only way I could make it work was with coordinates…
leave you with the code i have so far…
thank’s a lot!
// DEFINO POSICION DE VENTANA
puntoX1=10;
puntoX2=220;
puntoY1=10;
puntoY2=500;
// DEFINO TAMAÑO DE VENTANA
tamanoX=220;
tamanoY=500;
////////////////////////////////////////////////////////////////////
function createUI(thisObj)
{
var ventana = (thisObj instanceof Panel) ? thisObj : new Window(“palette”, “my script”, [100, 100, 300, 300], {resizeable:true});
ventana.stackgroup = ventana.add(“group”);
ventana.stackgroup.location=[puntoX1,puntoY1,puntoX2,puntoY2];
ventana.stackgroup.size=[tamanoX,tamanoY];
ventana.stacksubgroup1 = ventana.stackgroup.add(“group”);
ventana.stacksubgroup1.location=[puntoX1,puntoY1,puntoX2,puntoY2];
ventana.stacksubgroup1.size=[tamanoX,tamanoY];
ventana.stacksubgroup1.add(“statictext”,[10, 40, 90, 60], “A TOOL”);
ventana.stacksubgroup1.add(“edittext”,[100,40,195,60],”Sin Nombre”);
ventana.stacksubgroup1.add(“button”,[100,70,195,90],”apply”)
ventana.stacksubgroup2 = ventana.stackgroup.add(“group”);
ventana.stacksubgroup2.location=[puntoX1,puntoY1,puntoX2,puntoY2];
ventana.stacksubgroup2.size=[tamanoX,tamanoY];
ventana.stacksubgroup2.add(“statictext”,[10, 40, 90, 60], “B TOOL”);
ventana.stacksubgroup2.add(“edittext”,[100,40,195,60],”Sin Nombre”);
ventana.stacksubgroup3 = ventana.stackgroup.add(“group”);
ventana.stacksubgroup3.location=[10, 10, 200, 30];
ventana.stacksubgroup3.size=[200,30];
ventana.stacksubgroup3.add(“statictext”,[10, 10, 60, 30],”Tool”);
var toolMenu=ventana.stacksubgroup3.add(“dropdownlist”,[70, 10, 195, 30],[“A”,”B”,”C”,”D”,”E”]);
toolMenu.selection=0;
ventana.stacksubgroup1.visible=true;
ventana.stacksubgroup2.visible=false;
toolMenu.onChange=function fcreateUIS(){
var toolSelection = toolMenu.selection.index;
ventana.stacksubgroup1.visible = (toolSelection==0);
ventana.stacksubgroup2.visible = (toolSelection==1);
};
return(ventana);
}
var pal = createUI(this);
pal;