Table of Contents

Class OpenDialog

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

The OpenDialogprovides an interactive dialog box for users to select files or directories.

public class OpenDialog : FileDialog, IDisposable, ISupportInitializeNotification, ISupportInitialize
Inheritance
OpenDialog
Implements
Inherited Members

Remarks

The open dialog can be used to select files for opening, it can be configured to allow multiple items to be selected (based on the AllowsMultipleSelection) variable and you can control whether this should allow files or directories to be selected.

To use, create an instance of OpenDialog, and pass it to Run(Toplevel, Func<Exception, bool>, ConsoleDriver). This will run the dialog modally, and when this returns, the list of files will be available on the FilePaths property.

To select more than one file, users can use the spacebar, or control-t.

Constructors

OpenDialog()

Initializes a new OpenDialog.

Properties

FilePaths

Returns the selected files, or an empty list if nothing has been selected

OpenMode

Gets or Sets which FileSystemInfo type can be selected. Defaults to Mixed (i.e. DirectoryInfo or FileInfo).