Add a Help Button Scripting parameter

Hi there,

I am trying to include a preview Help Button as a script parameter, so that when the user clicks on the button next to the “OK” an example image with previews of the parameters will pop up. I don’t want for the initial Dialog to disappear when the Help Button is being clicked.

Something like:

#@HelpButton(label="Example Image") button

if button.clicked()
   imp= IJ.open("/Example Image")
   # use user input parameters to change stuff on image
   imp.show()

Is it possible to implement something like that using script parameters and avoid GenericDialog? I am using Jython as a scripting language.

Cheers

Hi @dcolam, as far as I know there is unfortunately no way to create a preview button using script parameters.
I think there is callback functionality that allows to do some action when a parameter is changed, but I am not sure it is exposed via the scripting language.

If you decide to go for GenericDialog (or GenericDialogPlus) this page can help you.
the classes have a addHelp method that allow to open a webpage when you clik the Help button, or you can define a custom Help button.