Re: extend length of popup menu in (NonBlocking)GenericDialog?

Posted by Norbert Vischer-2 on
URL: http://imagej.273.s1.nabble.com/Fwd-extend-length-of-popup-menu-in-NonBlocking-GenericDialog-tp5022259p5022277.html

Hello Kenneth,

Since version 1.52k, you can use a table of any length for interactive input,
I already used it for a similar case. See
http://wsr.imagej.net/macros/TableSelectionDemo.txt


Norbert

>
>
>
> On 26. Jun 2019, at 3:45, Kenneth R Sloan <[hidden email]> wrote:
>
> Thank you for the reply.  I will train my users to scroll.
>
> On Tue, Jun 25, 2019 at 19:09 Michael Schmid <[hidden email]>
> wrote:
>
>> Hi Kenneth,
>>
>> ImageJ uses java.AWT, the native toolkit of the operating system.
>>
>> The length of the list displayed on the screen for a java.awt.Choice is
>> determined by the operating system and/or java.awt, not by ImageJ. I see
>> not Java method to modify this. On my system (Linux Ubuntu 16.04) I can
>> see a maximum of 10 items.
>>
>> The only way out that I see would be manually creating a PopupMenu;
>> these show all items. You could show it e.g. when pressing some button
>> (like, e.g., the More>> button of the RoiManager), and you could add the
>> button to a Panel, which can be added to the GenericDialog. But that
>> would be a nasty hack...
>>
>>
>> Michael
>> ________________________________________________________________
>> On 21.06.19 08:30, Kenneth Sloan wrote:
>>> never got a request to confirm.  Trying again
>>> --
>>> Kenneth Sloan
>>> [hidden email]
>>> Vision is the art of seeing what is invisible to others.
>>>
>>>
>>>
>>>
>>>
>>>> Begin forwarded message:
>>>>
>>>> From: Kenneth Sloan <[hidden email]>
>>>> Subject: extend length of popup menu in (NonBlocking)GenericDialog?
>>>> Date: June 20, 2019 at 12:00:42 PDT
>>>> To: ImageJ Interest Group <[hidden email]>
>>>>
>>>> context: JAVA plugin (not macro)
>>>>
>>>> I am using a NonBlockingGenericDialog.  I use addChoice() to create a
>> popup menu item.  My list of options is longer than the default menu size.
>> Can I modify the size of the menu to eliminate scrolling by the user?
>>>>
>>>> Here's the relevant snippet of Java code:
>>>>
>>>>               NonBlockingGenericDialog nbgd = new
>> NonBlockingGenericDialog("annotate");
>>>>                   nbgd.addChoice("LRP
>> feature",knownRetinalLayers,null);
>>>>                   nbgd.addStringField("other/modifier","");
>>>>                   nbgd.setLocation(dialogLocationX,dialogLocationY);
>>>>                   nbgd.showDialog();
>>>>
>>>> My list of labels currently has 16 entries.  I would like for ALL of
>> them to appear when the user pulls down the menu.
>>>>
>>>>
>>>> --
>>>> Kenneth Sloan
>>>> [hidden email] <mailto:[hidden email]>
>>>> Vision is the art of seeing what is invisible to others.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
--
-Kenneth Sloan

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

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