Re: Dialog.addRadioButtonGroup labels alignment

Posted by Kaiming Yin on
URL: http://imagej.273.s1.nabble.com/Dialog-addRadioButtonGroup-labels-alignment-tp5020956p5020959.html

Dear Kees,

Sorry for my unclear question. Here I attach the command lines I ran in a
macro in FIJI and also the output panel in attached image. I'm running
Ubuntu 18.04 and FIJI version is ImageJ 2.0.0-rc-68/1.52e; java 1.8.0_66
[64-bit].

Command lines in macro:

Dialog.create("Different ImageJ versions");
Dialog.setInsets(0, 20, 0);
items = newArray("ImageJ                              ", "ImageJ
v1.52e                ", "ImageJ v1.52a to ImageJ v1.52e       ", "  ImageJ
v1.50 to ImageJ v1.51 to ImageJ v1.52e");
Dialog.addRadioButtonGroup("             Versions:", items, 4, 1,
"ImageJ                              ");
Dialog.show();

Thanks,
Kaiming

On 17 July 2018 at 08:44, Straatman, Kees (Dr.) <[hidden email]>
wrote:

> Dear Kaiming,
>
> Not sure what the problem is. Without all the spaces the labels align to
> the left as well see attached image.
>
> Kees
>
> -----Original Message-----
> From: Kaiming Yin [mailto:[hidden email]]
> Sent: 16 July 2018 18:42
> To: [hidden email]
> Subject: Dialog.addRadioButtonGroup labels alignment
>
> Dear guys,
>
> Can I ask if I want to add a Dialog.addRadioButtonGroup in my panel, and
> the button group has four choices with labels at different lengths for each
> choice. How can I align the four labels to the left in one column please?
> For example, currently I'm using command lines as below:
>
> items = newArray("ImageJ                              ", "ImageJ
> v1.52e                ", "ImageJ v1.52a to ImageJ v1.52e       ", "  ImageJ
> v1.50 to ImageJ v1.51 to ImageJ v1.52e");
>
> Dialog.addRadioButtonGroup("             Versions:", items, 4, 1,
> "ImageJ                              ");
>
> Currently I use spaces to try to align all the labels but seems quite
> clumsy. Is there any other way to do this?
>
> Thanks,
> Kaiming
>
> --
> 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

panel.png (11K) Download Attachment