-
add/remove buttons/dropdownlist from dockable panel UI
Hi! I’m looking for a way to being able to add and remove parts from a dockable panel UI. The ones looking like this:
var my_palette = (thisObj instanceof Panel) ? thisObj : new Window("palette", jdaempeg.scriptName + " v" + jdaempeg.scriptVersion, undefined, {
resizeable: true
});
if (my_palette != null) {
var res =
"group {orientation:'column', alignment:['fill','fill'], spacing:0, margins:[0,0,0,0], \
firstRow: Panel { text:'Original File:', orientation:'column', alignment:['fill','top'], \
g01: Group { orientation:'row', \
renderSetting: DropDownList {}, \
outputSetting: DropDownList {}, \
}, \
g02: Group { orientation:'row', alignment:['fill','fill'],\
outputPath: StaticText {text: 'Output to:', alignment:['left','left']}, \
outputPathBox: EditText {text: 'Path here', alignment:['fill','fill']}, \
changeOutputPath: Button {text: 'Change', alignment:['right','right']}, \
}, \
g03: Group { orientation:'row', alignment:['fill','fill'],\
keepOriginal: Checkbox {text: 'Keep original', alignment:['left','left']}, \
}, \
}, \
}";my_palette.margins = [10, 10, 10, 10];
my_palette.grp = my_palette.add(res);
In a floatable panel it’s easy to add buttons like g01.add(“button”,undefined, “Are you sure?”); but how can I do this with the code above?