gtk-sharp 2.12.0.0 Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. Gtk.Dialog System.Obsolete Creates a new dialog for the user to select one or more files, directories, or cancel.

should be used to retrieve file or directory names from the user. It will create a new dialog window containing a directory list, and a file list corresponding to the current working directory.

The filesystem can be navigated using the directory list or the drop-down history menu. Alternatively, the TAB key can be used to navigate using filename completion - common in text based editors such as emacs and jed.

Simple file operations; create directory, delete file, and rename file, are available from buttons at the top of the dialog.

The functionality of the can be extended by using the available accessors to the buttons and drop downs.

`using System; using Gtk; class FileSelectionSample { Label lbl; FileSelection fs; static void Main () { new FileSelectionSample (); } FileSelectionSample () { Application.Init (); Window win = new Window ("FileSelectionSample"); win.SetDefaultSize (250,200); win.DeleteEvent += new DeleteEventHandler (OnWinDelete); VBox vbox = new VBox (true, 1); win.Add (vbox); Button btn = new Button ("Select a file."); btn.Clicked += new EventHandler (OnButtonClicked); vbox.Add (btn); lbl = new Label ("Selected: "); vbox.Add (lbl); win.ShowAll () fs = new FileSelection ("Choose a file"); fs.Response += new ResponseHandler (OnFileSelectionResponse); Application.Run (); } void OnButtonClicked (object o, EventArgs args) { fs.Run (); fs.Hide (); } void OnFileSelectionResponse (object o, ResponseArgs args) { if (args.ResponseId == ResponseType.Ok) { lbl.Text = "Selected: " + fs.Filename; } } void OnWinDelete (object o, DeleteEventArgs args) { Application.Quit (); } }`
- Constructor
  2.12.0.0
  System.Obsolete
  a
  Protected Constructor.
  Chain to this constructor if you have manually registered a native value for your subclass.
- Constructor
  2.12.0.0
  Pointer to the C object.
  Internal constructor

  This is an internal constructor, and should not be used by user code.

- Constructor
  2.12.0.0
  A title that will appear in the window's title bar.
  The main way to construct a new file selector.
- Property
  2.12.0.0
  Gtk.HButtonBox The widget enclosing the items that can be acted upon. an object of type (FIXME: how is this different from ButtonArea? Gtk+ docs are thin about this.)
- Property
  2.12.0.0
  Gtk.HButtonBox A widget to contain all the button objects in this dialog. an object of type
- Property
  2.12.0.0
  Gtk.Button The 'cancel' button of this file selector.
- Method
  2.12.0.0
  System.Void `` A simple wildcard pattern such as '*.txt'. Restrict the visible files and directories to those that match the given .

  This method attempts to match to a valid filenames or subdirectories in the current directory. If a match can be made, the matched filename will appear in the text entry field of the . If a partial match can be made, the "Files" list will contain those file names which have been partially matched, and the "Folders" list will show those directories with a partial match.

- Property
  2.12.0.0
  Gtk.TreeView The widget that displays directories in this file selector.
- Property
  2.12.0.0
  Gtk.TreeView The widget that displays files in this file selector.
- Property
  2.12.0.0
  GLib.Property("filename")
  System.String Manage the selected filename. The selected filename in the on-disk encoding.

  If includes a directory path, then the requestor will open with that path as its current working directory. The encoding of filename is the on-disk encoding, which may not be UTF-8.

- Property
  2.12.0.0
  Gtk.Button The 'create directory' button of this file selector.

  This button may or may not be visible, see and .

- Property
  2.12.0.0
  Gtk.Button The 'delete' button of this file selector.

  This button may or may not be visible, see and .

- Property
  2.12.0.0
  Gtk.MessageDialog The dialog box for confirming actions, if necessary. an object of type
- Property
  2.12.0.0
  Gtk.Entry The main widget of this .
- Property
  2.12.0.0
  System.String The filename selected by this . an object of type
- Property
  2.12.0.0
  Gtk.Button The 'rename file' button of this file selector.

  This button may or may not be visible, see and .

- Property
  2.12.0.0
  GLib.GType GType Property. a Returns the native value for .
- Property
  2.12.0.0
  Gtk.Button A help button, not displayed by default.
- Method
  2.12.0.0
  System.Void Ensures that the file operation buttons are hidden.
- Property
  2.12.0.0
  Gtk.Menu The that is displayed by the . A menu containing the file system paths higher than the selected directory, and the user's directory history.

  Note that this does not just contain history, it contains a list of directories above the current directory in the filesystem as well as user directory history.

- Property
  2.12.0.0
  Gtk.OptionMenu The drop down menu containing directories in the filesystem above the selected directory, and the user's directory history. The at the top of the file selector.

  This widget displays the menu returned by .

- Property
  2.12.0.0
  Gtk.VBox The main in the file selector. a
- Property
  2.12.0.0
  Gtk.Button The 'OK' button of this file selector.
- Property
  2.12.0.0
  Gtk.Entry The text-entry widget for entering a filename into. an object of type
- Property
  2.12.0.0
  System.String[] Get the files that are selected An array of file paths
- Property
  2.12.0.0
  Gtk.Label The text to display about the file to be selected. an object of type
- Property
  2.12.0.0
  GLib.Property("select-multiple")
  System.Boolean Manage whether more than one file can be selected. if multiple selections are allowed, otherwise.
- Method
  2.12.0.0
  System.Void Ensures that the file operation buttons are visible.
- Property
  2.12.0.0
  GLib.Property("show-fileops")
  System.Boolean Manage whether buttons are displayed for doing file operations. for buttons to be shown, otherwise.

  This manipulates whether the buttons for creating a directory, deleting files and renaming files, are displayed.