This function returns an output filename selection widget that provides no option of output to memory. It returns the base ID of the widget. An interactive ENVI Classic session is required to run this function.


Result = WIDGET_OUTF(Base [, AUTO_MANAGE={0 | 1}] [, /DIRECTORY] [, DEFAULT=string] [, FUNC=string] [, PROMPT=string], UVALUE=value[, XSIZE=value])



This is the ID of the base widget.


AUTO_MANAGE (optional)

Use this keyword to specify how ENVI Classic auto-manages the widget with AUTO_WID_MNG. The keyword value specifies if the widget must have a defined value. Setting this keyword to a value of 1 requires that the widget has either a default value or a value that you enter. Setting this keyword to 0 does not require a value. Do not use this keyword for user-managed widgets.

DIRECTORY (optional)

Set this keyword to allow selection of an output directory.

DEFAULT (optional)

Use this keyword to specify the default text string to place in the widget.

FUNC (optional)

Use this keyword to specify the name of a function to call with the input string. This allows you to call a custom routine to validate inputs. A value of 1 is returned if the entered filename is valid. Otherwise, a value of 0 is returned.

PROMPT (optional)

Use this keyword to specify the prompt string to use for the widget.


Use this keyword to assign a “user value” to the widget. This value may be of any data type and organization. The user value exists entirely for your convenience. For widgets managed by the ENVI Classic function AUTO_WID_MNG, UVALUE is a tag name in the returned anonymous structure. For user-managed widgets, you can set and use UVALUE however you wish. You must set UVALUE for all compound widgets.

XSIZE (optional)

Use this keyword to specify the width of the widget, in characters.

Widget Event

When the widget is not auto-managed, widget events set event.result to the input string.


Create a simple compound widget to select a file. If the file is properly selected, then print the filename.

base = widget_auto_base(title='File Selection test')
wo = widget_outf(base, uvalue='outf', /auto)
result = auto_wid_mng(base)
if (result.accept eq 0) then return
print, 'Selected File', result.outf

API Version