Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Difference between variable UI layout and add() method UI layout?

$
0
0

Hi there,

 

What is the difference between a variable UI layout and add() method UI layout?

 

Variable UI layout is something like this:

 

var windowResource = "palette {  \    orientation: 'column', \    alignChildren: ['fill', 'top'],  \    preferredSize:[300, 130], \    text: 'ScriptUI Window - palette',  \    margins:15, \    \    bottomGroup: Group{ \        cd: Checkbox { text:'Checkbox value', value: true }, \        cancelButton: Button { text: 'Cancel', properties:{name:'cancel'}, size: [120,24], alignment:['right', 'center'] }, \        applyButton: Button { text: 'Apply', properties:{name:'ok'}, size: [120,24], alignment:['right', 'center'] }, \    }\
}";

var win = new Window(windowResource);

win.show();

 

add() method UI layout is something like this:

 

var w = new Window('dialog', 'Random Number Generator');
var btn_group = w.add('group'),    btn_ok = btn_group.add('button', undefined, 'Ok');

w.show();

 

 

Thanks!


Viewing all articles
Browse latest Browse all 27456

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>