ComboBox. Fix crash

This commit is contained in:
Ross Ferguson
2020-06-10 03:45:44 +01:00
parent d7de041275
commit c468d139e5
2 changed files with 4 additions and 2 deletions

View File

@@ -75,6 +75,8 @@ namespace Terminal.Gui {
/// </summary>
public ComboBox () : base()
{
ColorScheme = Colors.Base;
search = new TextField ("");
listview = new ListView () { LayoutStyle = LayoutStyle.Computed, CanFocus = true };

View File

@@ -42,14 +42,14 @@ namespace UICatalog.Scenarios {
var lbComboBox = new Label ("ComboBox") {
ColorScheme = Colors.TopLevel,
X = Pos.Right (lbListView) + 1,
Width = Dim.Percent(30)
Width = Dim.Percent(60)
};
var comboBox = new ComboBox () {
X = Pos.Right (listview) + 1,
Y = Pos.Bottom (lbListView) + 1,
Height = Dim.Fill (2),
Width = Dim.Percent(30)
Width = Dim.Percent(60)
};
comboBox.SetSource (items);