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(Func<Exception, bool>). 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.

OpenDialog(ustring, ustring, List<string>, OpenMode)

Initializes a new OpenDialog.

Properties

AllowsMultipleSelection

Gets or sets a value indicating whether this OpenDialog allows multiple selection.

CanChooseDirectories

Gets or sets a value indicating whether this OpenDialog can choose directories.

CanChooseFiles

Gets or sets a value indicating whether this OpenDialog can choose files.

FilePaths

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