Documentation‎ > ‎Deprecated Items‎ > ‎

    gnocl::fileSelection

    A standard dialog to choose a file

    (DEPRECATED since GTK+ 2.4).

    Synopsis

    gnocl::fileSelection [-option value...]

    Screenshot

    Options

    -title string (default: "")
    Title of the fileSelection.
    -modal boolean (default: 0)
    Whether the window is modal, i.e. it grabs all GTK+ events. If the dialogue is created modal, the command returns a list of chosen files instead of the usual widget ID.
    -selectMultiple boolean (default: 0)
    Whether one or more files can be selected.
    -showFileOps boolean (default: 1)
    Whether to show buttons for file operations.
    -file string (default: "")
    Default file or path for the dialogue.
    -onClicked 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:

    %w    widget name
    %x    button chosen: OK or CANCEL
    %f    list of files chosen
    -visible boolean (default: 1)
    Whether or not the item is visible.
    -onDestroy string (default: "")
    Tcl command which is executed if the widget is destroyed. Before evaluation the following percent strings are substituted:

    %w    widget name

    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 dialogue 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"]
    Comments

    Sections