Browse Source

ComboBox. Fix build warnings.

Ross Ferguson 5 years ago
parent
commit
d83ea59f15
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Terminal.Gui/Views/ComboBox.cs

+ 3 - 3
Terminal.Gui/Views/ComboBox.cs

@@ -64,8 +64,8 @@ namespace Terminal.Gui {
 		ustring text = "";
 		TextField search;
 		ListView listview;
-		int x;
-		int y;
+		int x = 0;
+		int y = 0;
 		int height;
 		int width;
 		bool autoHide = true;
@@ -114,7 +114,7 @@ namespace Terminal.Gui {
 			LayoutComplete += (LayoutEventArgs a) => {
 
 				search.Width = Bounds.Width;
-				listview.Width = Bounds.Width - 1;
+				listview.Width = autoHide ? Bounds.Width - 1 : Bounds.Width;
 			};
 
 			listview.SelectedItemChanged += (ListViewItemEventArgs e) => {