From 6f9758542778f1cf41bcd31e66232ce6ed6fc19d 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 74708f884..a5af2a12c 100644 --- a/Terminal.Gui/Views/ComboBox.cs +++ b/Terminal.Gui/Views/ComboBox.cs @@ -78,6 +78,19 @@ namespace Terminal.Gui { Initialize (); } + /// + /// Public constructor + /// + /// + public ComboBox (ustring text) : base () + { + search = new TextField (""); + listview = new ListView () { LayoutStyle = LayoutStyle.Computed, CanFocus = true }; + + Initialize (); + Text = text; + } + /// /// Public constructor ///