#
Prev |  | Next

# fileSelection

## Name

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

## Synopsis

fileSelection [`-option` `value`...]

## Screenshot

## Options

-title

  type: string (default: "")

  Title of the fileSelection.

-modal

  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.

-selectMultiple

  type: boolean (default: 0)

  Whether one or more files can be selected.

-showFileOps

  type: boolean (default: 1)

  Whether to show buttons for file operations.

-file

  type: string (default: "")

  Default file or path for the dialog.

-onClicked

  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

-visible

  type: boolean (default: 1)

  Whether or not the item is visible.

-onDestroy

  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

## Description

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.

## Commands

`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.

## Example

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

results in

## See also

colorSelection, fontSelection, `GtkFileSelection`

Prev | Home | Next
Commands | Up | combo