Przeglądaj źródła

Add SearchText field

Maciej Winnik 1 rok temu
rodzic
commit
7157e36712
1 zmienionych plików z 13 dodań i 1 usunięć
  1. 13 1
      Terminal.Gui/Views/ComboBox.cs

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

@@ -5,10 +5,10 @@
 //   Ross Ferguson ([email protected])
 //
 
+using NStack;
 using System;
 using System.Collections;
 using System.Collections.Generic;
-using NStack;
 
 namespace Terminal.Gui {
 	/// <summary>
@@ -725,6 +725,18 @@ namespace Terminal.Gui {
 			}
 		}
 
+		/// <summary>
+		/// Current search text 
+		/// </summary>
+		public ustring SearchText {
+			get {
+				return search.Text;
+			}
+			set {
+				search.Text = text = value;
+			}
+		}
+
 		private void SetValue (object text, bool isFromSelectedItem = false)
 		{
 			search.TextChanged -= Search_Changed;