Copy link to clipboard
Copied
Hi,
I'm a beginner of JavaScript.
Does anyone know, how to create a checkbox with some text. I've tried this below script, but it was not work.
var myDialog = app.dialogs.add ({name:"sample"});
with (myDialog.dialogColumns.add())
{
var myCheckBoxField = checkbox.add ({"ABC"});
}
var myResult = myDialog.show ();
Regards,
KPS
Hi Karuppasamy,
Try the following
var myDialog = app.dialogs.add ({name:"sample"});
with (myDialog.dialogColumns.add())
{
var myCheckBoxField = checkboxControls.add ();
myCheckBoxField.staticLabel = "ABC"
}
var myResult = myDialog.show ();
-Manan
Copy link to clipboard
Copied
Hi Karuppasamy,
Try the following
var myDialog = app.dialogs.add ({name:"sample"});
with (myDialog.dialogColumns.add())
{
var myCheckBoxField = checkboxControls.add ();
myCheckBoxField.staticLabel = "ABC"
}
var myResult = myDialog.show ();
-Manan
Copy link to clipboard
Copied
Hi Manan,
Thank you so much
It's working perfect!
Copy link to clipboard
Copied
Unless you have a good reason you should probably use SUI instead of app dialogs.
They are easier to work with.
Peter Kahrel has a good guide to them.
ScriptUI for dummies | Peter Kahrel
There's also a chapter in the tools kit guide. There's a link to the guide in the help menu of the ESTK (if that's still working by you:)
Find more inspiration, events, and resources on the new Adobe Community
Explore Now