From c468d139e54a8f463516d25bcdf830f844e64d0e Mon Sep 17 00:00:00 2001 From: Ross Ferguson Date: Wed, 10 Jun 2020 03:45:44 +0100 Subject: [PATCH] ComboBox. Fix crash --- Terminal.Gui/Views/ComboBox.cs | 2 ++ UICatalog/Scenarios/ListsAndCombos.cs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Terminal.Gui/Views/ComboBox.cs b/Terminal.Gui/Views/ComboBox.cs index 7796031d0..3b8688058 100644 --- a/Terminal.Gui/Views/ComboBox.cs +++ b/Terminal.Gui/Views/ComboBox.cs @@ -75,6 +75,8 @@ namespace Terminal.Gui { /// public ComboBox () : base() { + ColorScheme = Colors.Base; + search = new TextField (""); listview = new ListView () { LayoutStyle = LayoutStyle.Computed, CanFocus = true }; diff --git a/UICatalog/Scenarios/ListsAndCombos.cs b/UICatalog/Scenarios/ListsAndCombos.cs index 818fe18c8..053f5a1ce 100644 --- a/UICatalog/Scenarios/ListsAndCombos.cs +++ b/UICatalog/Scenarios/ListsAndCombos.cs @@ -42,14 +42,14 @@ namespace UICatalog.Scenarios { var lbComboBox = new Label ("ComboBox") { ColorScheme = Colors.TopLevel, X = Pos.Right (lbListView) + 1, - Width = Dim.Percent(30) + Width = Dim.Percent(60) }; var comboBox = new ComboBox () { X = Pos.Right (listview) + 1, Y = Pos.Bottom (lbListView) + 1, Height = Dim.Fill (2), - Width = Dim.Percent(30) + Width = Dim.Percent(60) }; comboBox.SetSource (items);