Login  Register

Re: script parameter for popup menu

Posted by bnorthan on Mar 18, 2016; 3:27pm
URL: http://imagej.273.s1.nabble.com/script-parameter-for-popup-menu-tp5015936p5015938.html

Hi Mark and Jon

a) if you are having trouble with script parameters in general the resource
Mark gave is good.  As well as http://imagej.net/Presentations (scroll down
to workshops->Parameterized Scripting + Ops).  Slides for that presentation
are here
https://imagej.github.io/presentations/2015-09-04-imagej2-scripting/#/

b) Perhaps you want a "menu" on your pop-up dialog??  Like a drop down that
gives you choices??

if so in java that is easy to do...

@Parameter(required = false, label = "Method", choices = { "Manual",
"Automatic" })
 private String method = "Automatic";

I couldn't get that to work in the script editor... do you know how Mark??
This is what I tried using Groovy

// @String(label="test",choices={"a","b"}) choicetest





On Fri, Mar 18, 2016 at 11:30 AM, Mark Hiner <[hidden email]> wrote:

> Hi Jon,
>
> The ImageJ wiki contains the documentation for script parameters[1]. It
> mentions that dialogs are created automatically, but I think it could be a
> bit clearer. I'll take a look.
>
> Best,
> Mark
>
>
> [1] http://imagej.net/Script_parameters
>
> On Fri, Mar 18, 2016 at 9:36 AM, JonNathan <
> [hidden email]> wrote:
>
> > Is there a way to implement a dialog popup menu using the "@parameter"
> > notation in Fiji's script editor?  I couldn't find an example for this in
> > the documentation.
> >
> > Jon Marsh
> >
> >
> >
> > --
> > View this message in context:
> >
> http://imagej.1557.x6.nabble.com/script-parameter-for-popup-menu-tp5015936.html
> > Sent from the ImageJ mailing list archive at Nabble.com.
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html