IDL supports several types of widgets and widget-like interface elements that can be used in your widget application:



Widget Primitives

Widget primitives are the base interface elements used to create widget applications. They are used to display visualizations, to allow the user to make selections within a UI, and to generate events. IDL widget primitives include standard interface elements such as buttons, combo boxes, lists, tables and labels. You can also add tables, trees, drawing areas and property sheets to a widget application.

See Widget Routines for a list of widget primitives and related widget routines.

Compound Widgets

Compound widgets are more complex interface elements built from the widget primitives. A compound widget is a complete, self-contained, reusable widget sub-tree that behaves to a large degree just like a widget primitive, but which is written in the IDL language. Compound widgets allow the development of reusable widget code, much like a GUI subroutine.

Compound widget routines provided with IDL can be found (along with many other routines that use the widgets) in the lib subdirectory of the IDL distribution. All compound widgets supplied along with IDL have filenames beginning with “CW_” to make them easier to identify.

See Widget Routines, Compound for a list of the compound widget routines provided in IDL.

Note: See Creating a Compound Widget for information on writing your own compound widgets.


Dialogs are widget-like elements that can be called from any IDL application (whether or not it uses other widgets), but which do not belong to a widget hierarchy. Dialogs are useful for informing users of changes in the application state or collecting relatively simple input, such as the answer to a “Yes or No” question or the name of a file. They have short lifetimes, and disappear after serving their purpose.

Dialogs are modal (or “blocking”), which means that when a dialog is displayed, no other interface elements (widgets or compound widgets) can be manipulated until the user dismisses the dialog. While the dialog is not part of any widget hierarchy, you can specify a widget over which the dialog will be centered on screen, making it possible to visually associate the dialog with a specific widget application.

See Dialog Routines for a list of available routines.


Utilities are self-contained widget applications written in the IDL language that can be invoked from the IDL command line or called from within an application. Most names of utility routines are prefaced with the letter “X”.

Although utility routines cannot be inserted directly into a widget application (becoming part of the application’s widget hierarchy), they can be linked to a widget application in such a way (via the GROUP keyword) that when the widget application is iconized or destroyed, the utility is iconized or destroyed as well. Utility routines can also be configured as modal applications, requiring that the user exit from the utility before returning to the widget application that called it. See Using Multiple Widget Hierarchies for further discussion of grouping and modal behaviors.