-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample-panel.jsx
56 lines (51 loc) · 1.35 KB
/
example-panel.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
function createDockableUI(thisObj) {
var dialog =
thisObj instanceof Panel
? thisObj
: new Window("window", undefined, undefined, { resizeable: true });
dialog.onResizing = dialog.onResize = function() {
this.layout.resize();
};
return dialog;
}
function showWindow(myWindow) {
if (myWindow instanceof Window) {
myWindow.center();
myWindow.show();
}
if (myWindow instanceof Panel) {
myWindow.layout.layout(true);
myWindow.layout.resize();
}
}
//Paste code here
// WIN
// ===
var win = createDockableUI(this);
win.text = "My Script";
win.orientation = "column";
win.alignChildren = ["center", "top"];
win.spacing = 10;
win.margins = 16;
var statictext1 = win.add("statictext", undefined, undefined, {
name: "statictext1"
});
statictext1.text = "Was this good?";
// GROUP1
// ======
var group1 = win.add("group", undefined, { name: "group1" });
group1.orientation = "row";
group1.alignChildren = ["left", "center"];
group1.spacing = 10;
group1.margins = 0;
var radiobutton1 = group1.add("radiobutton", undefined, undefined, {
name: "radiobutton1"
});
radiobutton1.text = "Yes";
radiobutton1.value = true;
var radiobutton2 = group1.add("radiobutton", undefined, undefined, {
name: "radiobutton2"
});
radiobutton2.text = "No";
//===============
showWindow(win);