Using the IDL 8.3 dialog_pickfile() function to pick out a file name, a filter list can be set, like this:
filters = [['*.jpg;*.jpeg', '*.tif;*.tiff', '*.png', '*.*'], ['JPEG', 'TIFF', 'Bitmap', 'All files']]
file = DIALOG_PICKFILE(/READ, FILTER = filters)
Every time, when calling the function the format filter is set to the very first filter index (here: '*.jpg'). As mentioned in the IDL help, the user cannot modify the displayed filter under Microsoft Windows. I think that also means, that there is now way to get the filter index when the user has clicked the "open" button - and to set the filter index while calling the dialog_pickfile function
Is there any workaround to set and get the filter index?
|