Tool Button

Community Beginner ,
Jan 27, 2021 Jan 27, 2021

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});

TOPICS
JavaScript

Views

39

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 1 Correct Answer

Most Valuable Participant , Jan 27, 2021 Jan 27, 2021
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.

Likes

Translate

Translate
Most Valuable Participant ,
Jan 27, 2021 Jan 27, 2021

Copy link to clipboard

Copied

LATEST

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.

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