Posted by
Gabriel Landini on
Feb 15, 2011; 2:53pm
URL: http://imagej.273.s1.nabble.com/Justify-in-dialog-boxes-tp3685680p3685687.html
On Tuesday 15 Feb 2011 14:29:56 you wrote:
> Dear List,
>
> I've written some straight forward macros that work fine. However there are
> several dialog boxes that are used, and it is really rather annoying that
> the text and any tick box/drop down menu etc are not justified in the
> dialog box. Here is an example:
>
> microscope = newArray("Old", "New");
> Dialog.create("Experiment Details");
> Dialog.addMessage("Please select which microscope was used.");
> Dialog.addChoice("Microscope:", microscope);
>
> Dialog.show();
>
> Here the choice box is left justified and the OK/Cancel buttons right
> justified. Or here:
>
> waitForUser("Click OK to continue");
>
> Is it possible to make them all center justified?
Center? No please that is not nice to read and means that multiple boxes will
not be aligned vertically.
I guess that you probably have lines that appear all over the dialogue, due to
a combination of the length of the text and the default length of the box.
But look how much tidier it appears in the example below which have longer
lines:
microscope = newArray("Old", "New");
Dialog.create("Experiment Details");
Dialog.addMessage("Please select which microscope was used.");
Dialog.addMessage("Yes.");
Dialog.addMessage("No.");
Dialog.addMessage("Maybe.");
Dialog.addChoice("Microscope:", microscope);
Dialog.addChoice("Very long line of text:", microscope);
Dialog.addChoice("A much longer line of text than the previous one:",
microscope);
Dialog.show();
waitForUser("Click OK on the button below to continue");
Cheers
Gabriel