From 53b9350b2e131c8a61e4a53bb6eaf7945a861f74 Mon Sep 17 00:00:00 2001 From: miguel Date: Sun, 29 Apr 2018 00:02:31 -0400 Subject: [PATCH] Fix button --- Terminal.Gui/Views/Button.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Terminal.Gui/Views/Button.cs b/Terminal.Gui/Views/Button.cs index 41dcac9d3..3143036b8 100644 --- a/Terminal.Gui/Views/Button.cs +++ b/Terminal.Gui/Views/Button.cs @@ -65,6 +65,8 @@ namespace Terminal.Gui { /// If set, this makes the button the default button in the current view, which means that if the user presses return on a view that does not handle return, it will be treated as if he had clicked on the button public Button (ustring text, bool is_default = false) : base () { + CanFocus = true; + this.IsDefault = is_default; Text = text; int w = text.Length + 4 + (is_default ? 2 : 0); Width = w;