Browse Source

ComboBox. Fix crash

Ross Ferguson 5 years ago
parent
commit
c468d139e5
2 changed files with 4 additions and 2 deletions
  1. 2 0
      Terminal.Gui/Views/ComboBox.cs
  2. 2 2
      UICatalog/Scenarios/ListsAndCombos.cs

+ 2 - 0
Terminal.Gui/Views/ComboBox.cs

@@ -75,6 +75,8 @@ namespace Terminal.Gui {
 		/// </summary>
 		public ComboBox () : base()
 		{
+			ColorScheme = Colors.Base;
+
 			search = new TextField ("");
 			listview = new ListView () { LayoutStyle = LayoutStyle.Computed, CanFocus = true };
 

+ 2 - 2
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);