fileSelection -- A standard dialog to choose a file (DEPRECATED since GTK+ 2.4).


fileSelection [-option value...]




type: string (default: "")

Title of the fileSelection.


type: boolean (default: 0)

Whether the window is modal, i.e. it grabs all GTK+ events. If the dialog is created modal, the command returns a list of chosen files instead of the usual widget ID.


type: boolean (default: 0)

Whether one or more files can be selected.


type: boolean (default: 1)

Whether to show buttons for file operations.


type: string (default: "")

Default file or path for the dialog.


type: string (default: "")

Command to execute in the global scope when the Ok or Cancel button is chosen. Before evaluation the following percent strings are substituted: TABLE %% | % %w | widget name %x | button chosen: OK or CANCEL %f | list of files chosen /TABLE


type: boolean (default: 1)

Whether or not the item is visible.


type: string (default: "")

Tcl command which is executed if the widget is destroyed. Before evaluation the following percent strings are substituated: TABLE %% | % %w | widget name. TABLE


This command is deprecated since GTK+ 2.4. Use fileChooser instead. A fileSelection is used to let the user choose a directory or one or more files in a standardized way. If the dialog is created modal, the commands returns a list of files. Otherwise it returns a widget ID in the usual way. The files and buttons chosen can be retrieved via the onClicked command.


id delete

Deletes the widget and the associated tcl command.

id configure [-option value...]

Configures the widget. Option may have any of the values accepted on creation of the widget.


set file [gnocl::fileSelection -title "Please choose a file" -modal 1 -file "/etc/host.conf"]

results in

See also

colorSelection, fontSelection, GtkFileSelection