Displaying Text Files

The IDL XDISPLAYFILE procedure displays an ASCII text file using a predefined widget interface. To see an example, enter the following statement at the IDL command prompt:

XDISPLAYFILE, FILEPATH('relnotes.txt') 

This command displays the current release notes file for your IDL installation in a widget interface.

To display your own text file, create a "Help" button of some sort in your widget interface and configure the button's event handling procedure to call XDISPLAYFILE with the full path to the text file.

See "XDISPLAYFILE" (IDL Reference Guide) for more details.

Note
By default, the XDISPLAYFILE window exists separately from your application, and will not be closed when your application exits. To ensure that the XDISPLAYFILE window closes when your application exits, set the value of the GROUP keyword equal to the widget ID of your application's top-level base. See Using Multiple Widget Hierarchies (User Interface Programming) for a discussion of widget grouping.