Copy link to clipboard
Copied
I wanna add tool button but i'm having trouble adding custom dialog box to it, can I put dialog somewhere
else like in function and add that to cExec? there must be an easier way?
This is what I have:
app.addToolButton({
cName: "Dialog",
cLabel: "Dialog",
cExec: "var oDlg ={description:{name: \"Test Dialog\",elements:[{name: \"Hello World\",type: \"static_text\",},{type: \"ok\",},]};app.execDialog(oDlg);",
cTooltext: "Click to get the message.",
nPos: 0});
Converting a script to a string is tricky. I would suggest putting the code in a function and then just calling that function from the cExec parameter.
Copy link to clipboard
Copied
Converting a script to a string is tricky. I would suggest putting the code in a function and then just calling that function from the cExec parameter.