i have a dockable gui with buttons. only way i know how to contorl position of buttons is to load them in differnt panels and have th listed top to bottom. is there any more percise way?
example code:
// main menu
// ./.
{
function myScript(thisObj){
function myScript_buildUI(thisObj){
var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "My window name", undefined, {resizeable:true});
res = "group{orientation:'row', allignment:['fill', 'fill'], allignChildren:['fill', 'fill'],\
myPanel: Panel{text:'my panel', orientation:'column',\
myPanelbutton1: Button{text:'clear render queue'},\
myPanelbutton2: Button{text:'delete new comps'},\
},\
}";
myPanel.grp = myPanel.add(res);
//Setup panel sizing
myPanel.layout.layout(true);
myPanel.grp.minimumSize = myPanel.grp.size;
//Make the panel reszeable
myPanel.layout.resize();
myPanel.onResizing = myPanel.onResize = function(){this.layout.resize()};
var myPanelbutton1 =myPanel.grp.myPanel.myPanelbutton1
myPanelbutton1.onClick = function () {
reset2();
}
var myPanelbutton2 =myPanel.grp.myPanel.myPanelbutton2
myPanelbutton2.onClick = function () {
reset1();
}
return myPanel;
}
var myScriptPal = myScript_buildUI(thisObj);
if((myScriptPal != null) && (myScriptPal instanceof Window)){
myScriptPal.center();
myScriptPal.show();
}
}
myScript(this);
}