From 363367f92e17787bdf52b97c865aaff08c6e7ece Mon Sep 17 00:00:00 2001 From: Ross Ferguson Date: Sat, 20 Jun 2020 12:15:08 +0100 Subject: [PATCH] Add constructor that takes a text argument --- Terminal.Gui/Views/ComboBox.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Terminal.Gui/Views/ComboBox.cs b/Terminal.Gui/Views/ComboBox.cs index 8f2022186..758fb2397 100644 --- a/Terminal.Gui/Views/ComboBox.cs +++ b/Terminal.Gui/Views/ComboBox.cs @@ -91,6 +91,19 @@ namespace Terminal.Gui { Text = text; } + /// + /// Public constructor + /// + /// + public ComboBox (ustring text) : base () + { + search = new TextField (""); + listview = new ListView () { LayoutStyle = LayoutStyle.Computed, CanFocus = true }; + + Initialize (); + Text = text; + } + /// /// Public constructor ///