Browse Source

File Dialog: hook up cancel button

Miguel de Icaza 7 năm trước cách đây
mục cha
commit
829aae09c8
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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) {