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

Re: dialog_pickfile

In article <3ACB5CAB.C984FA8E@noaa.gov>, "Pavel A. Romashkin"
<pavel.romashkin@noaa.gov> wrote:

> Is it a Mac thing that the FILE keyword is ignored in DIALOG_PICKFILE?
> temp = dialog_pickfile(file='first_guess.txt')
> results in "all files" mask and no initial selection. Of course,
> "first_guess.txt" exists in the directory of interest.
> Pavel

Hi Pavel,

It is indeed a Mac thing that the file keyword is ignored in
dialog_pickfile when /write is not specified. This is because the standard
Mac open dialog does not have an actual field for type ahead searching
like the other platforms (and Mac OS X for that matter).

If you want to limit the display to only that file use the filter keyword:

temp = dialog_pickfile(filter='first_guess.txt')

this will set the value of the filter to first_guess.txt and will hide all
other files.