Class OpenDialog | Terminal.Gui v2 (original) (raw)

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

public class OpenDialog : FileDialog, IDisposable, ISupportInitializeNotification, ISupportInitialize, IDesignable

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 toRun(Toplevel, 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.