Name

FileSelectBox

tixFileSelectBox pathname [option value...]

The tixFileSelectBox command creates a new tixFileSelectBox mega-widget named pathName. The tixFileSelectBox class is derived from the tix-Primitive class. It provides a method for a user to select a file similar to the style used in Motif.

Widget-Specific Options

-browsecmd tclCommand (browseCmd, BrowseCmd)

Command to call whenever the user browses a file (usually by a single click). The filename is appended as an argument.

-command tclCommand (command, Command)

Command to call whenever the user activates a file (usually by a doubleclick). The absolute path of the filename is appended as an argument.

-directory directory (directory, Directory)

The current directory whose files and subdirectories are displayed.

-disablecallback boolean (disableCallback, DisableCallback)

Whether callbacks (-command)are disabled.

-pattern pattern (pattern, Pattern)

List of file patterns to match with the files in the current directory.

-value fileName (value, Value)

Name of the currently selected file.

Subwidgets

dirlist

The tixScrolledListBox mega-widget for listing directories.

filelist

The tixScrolledListBox mega-widget for listing files.

filter

The tixComboBox mega-widget for the filter string.

selection

The tixComboBox mega-widget for the selected file.

Methods

pathName filter

Force refiltering of listed filenames according to the -pattern option.

pathName invoke

Call the command given by -command with the current filename.

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.