Login  Register

Advanced Dialog boxes

Posted by John Alexander-7 on May 18, 2008; 2:42am
URL: http://imagej.273.s1.nabble.com/Advanced-Dialog-boxes-tp3696187.html

Hello group,

I am wondering about some more advanced dialog box features in a macro.

For example, let's say I want to have a field on the box continuously
updated.  For example, I want one option to depend on the other.  If the
person types "2" in the X box, then the Y box automatically prints "4"
(as in 2*X).  If the person types "6" in the Y box, then the X
automatically is set to 3.  Basically I want the dialog box to be
interactive - and only commit the values to the assigned variables once
the person clicks "ok".

Another thing is to have an "input directory" and an "output directory"
field with a "browse" button next to them.

What about having an option grayed out if it is unecessary.

For example: I would have a checkbox that says "process single file?" If
the person checks it - then the "recursively process directory" field
would be greyed out since it is irrelevant.

Are such advanced dialog featuers available in ImageJ macros?  Or is
such interactivity for plug-ins?

So far I am exclusively writing macros - since I have really not found
the need to learn how to write a plug-in.  I know that if I put a tad
bit of effort into learning how to write a plug-in it will be easy - ust
being lazy.  :P



John




--
John K. Alexander, Ph.D.
Post-Doctoral Fellow
William Green Laboratory
University of Chicago
Dept. Neurobiology, Pharmacology, and Physiology
947 East 58th Street
Abott Hall 402
Chicago, IL 60637
(off) 773-702-9386
(fax) 773-702-3774
[hidden email]