Copy link to clipboard
Copied
In Adobe Illustrator CC 2014 Win 7 and Mac OS X 10.8
function dropdown2(win_location, win_width, h50, list2) {
var ww = new Window ("dialog");
var g = ww.add ("group");
var panel = g.add("panel", [0, 0, 300, 200]);
var sbar = g.add ("scrollbar", [0, 0, 20, 200]);
ww.show();
}
var w = new Window ("dialog");
w.add("button", undefined, "asdads").onClick = function () {
dropdown2([200, 200], 200, 50, ["asdaf", "asdaf", "asdaf", "asdaf" ]); };
w.show();
No idea why that was the case, but setting enabled = true seems to do the trick.
...function dropdown2(win_location, win_width, h50, list2) {
var ww = new Window ("dialog");
var g = ww.add ("group");
var panel = g.add("panel", [0, 0, 300, 200]);
var dd = panel.add('dropdownlist',[4, 4, 290, 20],list2);
var sbar = g.add ("scrollbar", [0, 0, 20, 200]);
sbar.enabled=true;
ww.show();
}
var w = new Window ("dialog");
Copy link to clipboard
Copied
what's not working? what are you trying to do?
Copy link to clipboard
Copied
bar in scrollbar does not moved/selected in a nested dialog (in the code from the first post)
in main dialog work well
dropdown2([200, 200], 200, 50, ["asdaf", "asdaf", "asdaf", "asdaf" ]);
IMHO bug.
May need to know about this bug to developers?
Copy link to clipboard
Copied
the scrollbar does move, the script works ok, exactly the way you have scripted it...can you explain in more detail what you're trying to do?
Copy link to clipboard
Copied
function dropdown2(win_location, win_width, h50, list2) {
var ww = new Window ("dialog");
var g = ww.add ("group");
var panel = g.add("panel", [0, 0, 300, 200]);
var sbar = g.add ("scrollbar", [0, 0, 20, 200], list2);
ww.show();
}
dropdown2([200, 200], 200, 50, ["asdaf", "asdaf", "asdaf", "asdaf" ]);
var w = new Window ("dialog");
w.add("button", undefined, "asdads").onClick = function () {
dropdown2([200, 200], 200, 50, ["asdaf", "asdaf", "asdaf", "asdaf" ]); };
w.show();
Illustrator CC 2014
Ctrl+F12
first scrollbar its ok
press button
scrollbar arrows -> gray
Copy link to clipboard
Copied
ok, this is a different script...I can't reproduce your problem with CS5, it may be a bug.
Copy link to clipboard
Copied
Yes, it was well to CS5, CS6
Copy link to clipboard
Copied
No idea why that was the case, but setting enabled = true seems to do the trick.
function dropdown2(win_location, win_width, h50, list2) {
var ww = new Window ("dialog");
var g = ww.add ("group");
var panel = g.add("panel", [0, 0, 300, 200]);
var dd = panel.add('dropdownlist',[4, 4, 290, 20],list2);
var sbar = g.add ("scrollbar", [0, 0, 20, 200]);
sbar.enabled=true;
ww.show();
}
var w = new Window ("dialog");
w.add("button", undefined, "asdads").onClick = function () {
dropdown2([200, 200], 200, 50, ["asdaf", "asdaf", "asdaf", "asdaf" ]);
};
w.show();
Copy link to clipboard
Copied
thank you
so easy
I did not think
and created the scroll buttons instead of scrollbars
Find more inspiration, events, and resources on the new Adobe Community
Explore Now