How to make reaction to select of items in the listbox


hi everyone, started learn scripts, newbie!

task listboks, filled dynamically names of images in directory (in example filled itself), need show ideally in separate location panel image itself. well, or @ least, tell me how assign reaction selection of items in listbox , put file name edittext field.

 

var w = new window("dialog",'title'); p1 = w.add("panel", [10,10,200,150],""); p1.orientation = 'column'; p1.alignment="left";  e1= p1.add('edittext',undefined,""); e1.preferredsize.width= 100; list1 = p1.add ('listbox', [30,30, 100, 100], 'asd'); list1.add("item","one.jpg"); list1.add("item","two.jpg");  w.show();  

something this?

 

 

var w = new window("dialog",'title'); p1 = w.add("panel", [10,10,200,150],""); p1.orientation = 'column'; p1.alignment="left";  e1= p1.add('edittext',undefined,""); e1.preferredsize.width= 100; list1 = p1.add ('listbox', [30,30, 100, 100], 'asd'); list1.add("item","one"); list1.add("item","two"); list1.selection=0; e1.text=list1.selection.text; list1.onchange=function(){     e1.text=list1.selection.text;     } w.show();  


More discussions in Photoshop Scripting


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account