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

Re: widget: open directory



Ralf Schaa wrote:
> i'm  a newbie in idl and i have the following problem: (the first of a
> lot...)
> 
> in a widget, i like to have a pulldown-menu, which opens the workdirectory
> and let me browse in the filesystem and let me select a file to do 'things'
> with...(on unix)
> 
> any suggestions?

Create a button with the label 'Browse...'

When the user clicks on the button, execute the following command:

result = dialog_pickfile()

If the returned value is not the null string (''), then a valid filename
was selected. See the online help for the keywords supported by
dialog_pickfile.

There is also a file selector compound widget (cw_filesel) that you
could use, but I prefer dialog_pickfile.

Cheers,
Liam.
http://cimss.ssec.wisc.edu/~gumley/