Dialog with a Dialog

Participant ,
Jun 08, 2022 Jun 08, 2022

Copy link to clipboard

Copied

Hi,

I need to add a dialog within another dialog after getting the value from the first dialog. Hereby I have attached the code which I have used to show another dialog. Please guide me on this....

 

var myWindow = new Window ("dialog", "Fitting Table");
var myInputGroup = myWindow.add ("group");
myInputGroup.add ("statictext", undefined, "Number of Columns:");
var myText = myInputGroup.add ("edittext", undefined, "");
myText.characters = 20;
var myButtonGroup = myWindow.add ("group");
myButtonGroup.orientation = "column";
var OkButton = myButtonGroup.add ("button", undefined, "OK");
var backbutton = myButtonGroup.add ("button", undefined, "Cancel");
myWindow.show ();

OkButton.onClick = function(){myDialog.show()};


var myDialog = new Window ("dialog", "Table");
var myInputGroup1 = myDialog.add ("group");
myInputGroup1.add ("statictext", undefined, "Column Width value:");
var myText = myInputGroup1.add ("edittext", undefined, "");
myText.characters = 20;

-Monisha
TOPICS
Feature request , How to , Scripting

Views

65

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
community guidelines

correct answers 2 Correct answers

Adobe Community Professional , Jun 08, 2022 Jun 08, 2022
For your 'Fitting Table' window, use a palette instead of a dialog. P.

Likes

Translate

Translate
Community Beginner , Jun 09, 2022 Jun 09, 2022
I hope this can help you!.var myWindow = new Window ("dialog", "Fitting Table"); var myInputGroup = myWindow.add ("group"); myInputGroup.add ("statictext", undefined, "Number of Columns:"); var myText = myInputGroup.add ("edittext", undefined, ""); myText.characters = 20; var myButtonGroup = myWindow.add ("group"); myButtonGroup.orientation = "column"; var OkButton = myButtonGroup.add ("button", undefined, "OK"); var backbutton = myButtonGroup.add ("button", undefined, "Cancel"); OkButton.onClic...

Likes

Translate

Translate
Adobe Community Professional ,
Jun 08, 2022 Jun 08, 2022

Copy link to clipboard

Copied

For your 'Fitting Table' window, use a palette instead of a dialog.

P.

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
community guidelines
Community Beginner ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

LATEST

I hope this can help you!.

var myWindow = new Window ("dialog", "Fitting Table");
var myInputGroup = myWindow.add ("group");
myInputGroup.add ("statictext", undefined, "Number of Columns:");
var myText = myInputGroup.add ("edittext", undefined, "");
myText.characters = 20;
var myButtonGroup = myWindow.add ("group");
myButtonGroup.orientation = "column";
var OkButton = myButtonGroup.add ("button", undefined, "OK");
var backbutton = myButtonGroup.add ("button", undefined, "Cancel");
OkButton.onClick = function(){
        onCLick();
}
backbutton.onClick = function(){
    myWindow.close();
}
function onCLick(){
    var myDialog = new Window ("dialog", "Table");
    var myInputGroup1 = myDialog.add ("group");
        myInputGroup1.add ("statictext", undefined, "Column Width value:");
    var myText = myInputGroup1.add ("edittext", undefined, "");
        myText.characters = 20;
    var myButtonGroup = myDialog.add ("group");
        myButtonGroup.orientation = "column";
    var OkTable = myButtonGroup.add ("button", undefined, "OK");
    var backTable = myButtonGroup.add ("button", undefined, "Cancel");
    OkTable.onClick = function (){
        myDialog.close();
        myWindow.close();
    }
    backTable.onClick = function (){
        myDialog.close();
    }
    myDialog.show();
}
myWindow.show();

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
community guidelines