Question
Dialogue window is always in focus
How to change the code so that when the button is pressed, the dialog window does not close, and it would be possible to re-enter the data in the edittext and click the button again?
app.addMenuItem({ cParent:"Help", cName:"-", cExec:" ", nPos: 0});
app.addMenuItem({ cParent: "Help", cUser: "Test", cName: "Test", cExec: "Test()", cEnable: "event.rc = (event.target != null);", nPos: 0});
function Test()
{
var dialog1 =
{
Btn1: function(dialog)
{
var result = dialog.store()["Txt1"]
Ndata = result
dialog.end("Btn1");
},
Stop: function(dialog)
{
idx = "Cancel"
dialog.end("Stop");
},
description:
{name: "Test", align_children: "row", width: 300, height: 300,
elements:
[
{
alignment: "align_right",
type: "button",
name: "Cancel",
item_id: "Stop",
width: 5
},
{
type: "edit_text",
item_id: "Txt1",
width: 170,
height: 25
},
{
type: "button",
name: "Enter date",
item_id: "Btn1",
}
]
}
};
app.execDialog(dialog1);
array = this.getPageBox("Crop",1);
r = array.toString()
r = r.split(",");
rectX1 = [Math.round(r[2])-391, 108, Math.round(r[2])-354, 132];
this.addAnnot({page: 1, type: "Stamp", rect: rectX1, author: "", AP: "#NewDate" })
}; app.trustedFunction(Test);
