Re: Manual choice within a GenericDialog
Posted by
CARL Philippe (LBP) on
Jul 05, 2020; 1:04pm
URL: http://imagej.273.s1.nabble.com/Manual-choice-within-a-GenericDialog-tp5023615p5023617.html
Dear Gabriel,
Indeed in the case the user chooses "manual choice" or "User values" within the choice field, there could be a second dialog to be opened requesting for the entry or like I described it below having a StringField just next to the choice field which entry would be ignored in the case the user didn't select the "manual choice".
But my request is for having a "all in one" field with a choice field which could then be "transformed into a stringField" within one of its choices (by using the Java langage).
Take care,
Philippe
----- Mail original -----
De: "Gabriel Landini" <
[hidden email]>
À: "imagej" <
[hidden email]>
Envoyé: Dimanche 5 Juillet 2020 14:17:32
Objet: Re: Manual choice within a GenericDialog
Hi,
You could add a 2nd dialog if he user chooses "Manual entry" in the first one.
A bit like the Coloru deconvolution plugin, when you choose "User values".
Sorry if I am not understanding the problem fully.
Cheers
Gabriel
On Sunday, 5 July 2020 13:00:00 BST you wrote:
> Dear all,
> Within a GenericDialog, I would like to give the possibility to choose
> between some preprogrammed choices and in the case the user isn't happy
> about the proposed offer that he manually types in an alternative choice
> (in String format). This can of course easily be done by combining an
> addChoice and addStringField with a "manual choice" within the addChoice
> and the use of an if function that will then read the StringField content.
> My question is if it would be possible to have a kind of "one stone, two
> birds" method that would be an addChoice method and within one of its
> choices could be transformed in a kind of StringField? I thank you very
> much for your lighting on this.
> My best regards,
> Philippe
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html