Highlighted

Ui code for deign

Participant ,
Sep 16, 2020

Copy link to clipboard

Copied

Hi Everyone,

If anyone,  have UI code for Indesign to relink the images for below design from the three different folders

 

selections

 
 

Screenshot 2020-09-16 at 9.19.48 PM.png

Adobe Community Professional
Correct answer by Charu Rajput | Adobe Community Professional

Try this

var win = new Window("dialog", "Dialog");
var maingroup = win.add("panel {orientation: 'column'}");


row = win.add('group', undefined, '');
row.orientation = 'row';
row.alignment = 'Center';
var okButton = row.add('button', undefined, 'OK'); 
var cancelButton = row.add('button', undefined, 'Cancel');
plusButton = row.add("button", undefined, "+");
plusButton.onClick = add_btn;

add_row(maingroup);
win.show();

function add_row(maingroup) {
    var group = maingroup.add("group");
    group.edit = group.add("edittext", [" ", " ", 200, 20], "Edit Text");
    group.plus = group.add("button", undefined, "Button");
    group.plus.onClick = add_btn;
    win.layout.layout(true);
}

function add_btn() {
    add_row(maingroup);
}

function minus_btn() {
    maingroup.remove(this.parent);
    win.layout.layout(true);
}
TOPICS
Scripting

Views

62

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Ui code for deign

Participant ,
Sep 16, 2020

Copy link to clipboard

Copied

Hi Everyone,

If anyone,  have UI code for Indesign to relink the images for below design from the three different folders

 

selections

 
 

Screenshot 2020-09-16 at 9.19.48 PM.png

Adobe Community Professional
Correct answer by Charu Rajput | Adobe Community Professional

Try this

var win = new Window("dialog", "Dialog");
var maingroup = win.add("panel {orientation: 'column'}");


row = win.add('group', undefined, '');
row.orientation = 'row';
row.alignment = 'Center';
var okButton = row.add('button', undefined, 'OK'); 
var cancelButton = row.add('button', undefined, 'Cancel');
plusButton = row.add("button", undefined, "+");
plusButton.onClick = add_btn;

add_row(maingroup);
win.show();

function add_row(maingroup) {
    var group = maingroup.add("group");
    group.edit = group.add("edittext", [" ", " ", 200, 20], "Edit Text");
    group.plus = group.add("button", undefined, "Button");
    group.plus.onClick = add_btn;
    win.layout.layout(true);
}

function add_btn() {
    add_row(maingroup);
}

function minus_btn() {
    maingroup.remove(this.parent);
    win.layout.layout(true);
}
TOPICS
Scripting

Views

63

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 16, 2020 0
Adobe Community Professional ,
Sep 26, 2020

Copy link to clipboard

Copied

Try this

var win = new Window("dialog", "Dialog");
var maingroup = win.add("panel {orientation: 'column'}");


row = win.add('group', undefined, '');
row.orientation = 'row';
row.alignment = 'Center';
var okButton = row.add('button', undefined, 'OK'); 
var cancelButton = row.add('button', undefined, 'Cancel');
plusButton = row.add("button", undefined, "+");
plusButton.onClick = add_btn;

add_row(maingroup);
win.show();

function add_row(maingroup) {
    var group = maingroup.add("group");
    group.edit = group.add("edittext", [" ", " ", 200, 20], "Edit Text");
    group.plus = group.add("button", undefined, "Button");
    group.plus.onClick = add_btn;
    win.layout.layout(true);
}

function add_btn() {
    add_row(maingroup);
}

function minus_btn() {
    maingroup.remove(this.parent);
    win.layout.layout(true);
}
Best regards

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 26, 2020 2