Browse Source

File Dialog: hook up cancel button

Miguel de Icaza 7 years ago
parent
commit
829aae09c8
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Terminal.Gui/Dialogs/FileDialog.cs

+ 4 - 0
Terminal.Gui/Dialogs/FileDialog.cs

@@ -320,6 +320,10 @@ namespace Terminal.Gui {
 			};
 
 			this.cancel = new Button ("Cancel");
+			this.cancel.Clicked += () => {
+				canceled = true;
+				Application.RequestStop ();
+			};
 			AddButton (cancel);
 
 			this.prompt = new Button (prompt) {