mrwidget_fileselect.pro


Name:
mrWidget_fileselect
Syntax:
widget_id = mrwidget_fileselect( parent, scr_xsize=int, scr_ysize=int,
.           uvalue=value, filter=string[array], /frame, /no_cancel)
Return value:
The widget id of the created compound widget or 0L in case of errors.
Arguments:
parent
Widget id of the parent
filter
A string or array of strings holding filter settings for the corresponding
drop-down list. One entry may contain several filters, separated by whitespace,
e.g. ['*', '*.jpg *.tiff', '*.dcm *dicom']
scr_xsize, scr_ysize
x and y size in pixels on screen
frame
If set, draw a frame around the widget
no_cancel
If set, no cancel button is displayed
Description:
A compound widget realizing a file-selector box, similar to IDL's cw_filesel,
but nicer layout. Only runs on Windows.
mrWidget_fileselect events have the following event structure:
{ MRWIDGET_FILESELECT_EVT, ID:0L, TOP:0L, HANDLER:0L, TYPE:0, PATH:'', FILE:'' }
Where type is one of:
0: the user pressed the 'cancel' button
1: the user either single clicked a file or used the cursor keys to select
the next file. PATH and FILE are set accordingly
2: the user double clicked a file or pressed the open button. Pressing the open
button with no file selected will not cause an event.

Name:
mrwidget_fileselect_realize
Description:
Fill filelist and initialize

Name:
mrwidget_fileselect_evt
Description:
Returning '0' will swallow the event, otherwise we return a
fileselect event.

Name:
mrwidget_fileselect_set
Description:
Called from widget_control, this_id, set_value=value

Name:
mrwidget_fileselect_get
Description:
Called via widget_control, this_id, get_value=value
If a file is selected, the full path to the file is returned,
otherwise only the currently selected path is returned to the user.

Last modified: Mon Nov 29 13:30:07 2004