IT lexicon › Programming › XmFileSelectionBox

XmFileSelectionBox

Programming På svenska → Updated: 2026-10-09

Motif's file dialog: one filter, two lists and four buttons, unloved enough that Netscape users on Unix learned to type the full path by hand instead.

The widget is a subclass of XmSelectionBox and consists of a Filter text field holding a glob pattern such as /home/anna/*.txt, a Directories list, a Files list, a Selection text field and the buttons OK, Filter, Cancel and Help. You navigate by double-clicking a directory, which rewrites the filter and reruns the search, or by editing the pattern yourself and pressing Filter. The resources XmNdirectory, XmNpattern, XmNdirMask and XmNfileTypeMask control what is shown, and XmNfileSearchProc lets the program replace the directory scan itself, say with a listing from an FTP server. XmCreateFileSelectionDialog delivers it pre-packaged in a dialog shell.

The dialog was the Motif experience in concentrate: correct per the Style Guide, identical on every Unix flavour, and clumsy in a way any user of Netscape or Mosaic on a Sun could describe in detail. No icons, no history, and the filter was rewritten behind your back the moment you changed directory. Motif 2.0 added XmNpathMode with a separate directory field, which helped somewhat. The file dialogs in GTK and Qt were to a large degree reactions to this one.

← Back to the lexicon