Copy link to clipboard
Copied
HI.
I want to set item click event in dropdownlist. (not onChange())
I not found that in API.
Any Ideas?
Thanks.
Copy link to clipboard
Copied
use onClick event
Copy link to clipboard
Copied
sample script:
function main(defaultWidth) {
var w = new Window ("dialog", "Adjust Col._v1.0" );
var tp = w.add('panel', undefined, "Choose target to apply width…" );
var dd = tp.add('dropdownlist',undefined, ["Text", "Col"]);
var vp = w.add('panel', undefined, "Set width value…" );
var ti = vp.add('edittext', undefined, defaultWidth );
var btnGp = w.add('group');
var koBtn = btnGp.add('button', undefined, "Cancel");
var okBtn = btnGp.add('button', undefined, "OK");
btnGp.orientation = "row";
btnGp.alignment = "fill";
btnGp.alignChildren = ["fill","right"];
tp.alignment = "fill";
dd.alignment = "fill";
vp.alignment = "fill";
ti.alignment = "fill";
dd.selection = 0;
koBtn.onClick = function() { w.close(0); }
okBtn.onClick = function() { w.close(1); }
if ( w.show() == 1 ) {
alert( "you want to apply "+ti.text+" on "+dd.selection.text );
}
}
main(500);
Copy link to clipboard
Copied
Hi.
I want to set click event in "dropdownlist".
Dropdownlist can not be set onClick() event.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Un brin d'humour dans ce monde de brutes! [The French Touch!]
Copy link to clipboard
Copied
Thanks!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now