Browse Source

Add SearchText field

Maciej Winnik 1 year ago
parent
commit
7157e36712
1 changed files with 13 additions and 1 deletions
  1. 13 1
      Terminal.Gui/Views/ComboBox.cs

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

@@ -5,10 +5,10 @@
 //   Ross Ferguson ([email protected])
 //   Ross Ferguson ([email protected])
 //
 //
 
 
+using NStack;
 using System;
 using System;
 using System.Collections;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
-using NStack;
 
 
 namespace Terminal.Gui {
 namespace Terminal.Gui {
 	/// <summary>
 	/// <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)
 		private void SetValue (object text, bool isFromSelectedItem = false)
 		{
 		{
 			search.TextChanged -= Search_Changed;
 			search.TextChanged -= Search_Changed;