2
0
Эх сурвалжийг харах

Add constructor that takes a text argument

Ross Ferguson 5 жил өмнө
parent
commit
6f97585427

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

@@ -78,6 +78,19 @@ namespace Terminal.Gui {
 			Initialize ();
 		}
 
+		/// <summary>
+		/// Public constructor
+		/// </summary>
+		/// <param name="text"></param>
+		public ComboBox (ustring text) : base ()
+		{
+			search = new TextField ("");
+			listview = new ListView () { LayoutStyle = LayoutStyle.Computed, CanFocus = true };
+
+			Initialize ();
+			Text = text;
+		}
+
 		/// <summary>
 		/// Public constructor
 		/// </summary>