[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: widget function returns an array

Eric (eeeyler@my-deja.com) writes:

> I wish to make a widget that will allow me to select multiple
> sub-directories from a parent directory and return a string array of
> those sub-directories when I click a 'done' button.  I wish to return
> the array to a parent procedure, and have the widget destroyed.  Can
> this be done?

This can't be done with anything built into IDL, since
Dialog_Pickfile does not support multiple directory
selection. (It does support multiple file selection,
so I suppose it *might* work in UNIX, but I can't test
it here.) Such a compound widget would be fairly easy
to build, I should think. 

Getting the information back to the calling program is
also easy. See the "Writing Modal Widget Dialogs" chapter
of my book. :-) (Or, if you are one of the three or four
people still without a book, see a program like GetImage
on my web page for an example of how it is done.)



David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155