mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Fixed combobox
This commit is contained in:
@@ -817,7 +817,6 @@ Three ",
|
||||
{
|
||||
ObservableCollection<string> source = ["One", "Two", "Three"];
|
||||
var cb = new ComboBox { Width = 10 };
|
||||
cb.SetSource (source);
|
||||
var top = new Toplevel ();
|
||||
|
||||
top.Add (cb);
|
||||
@@ -826,6 +825,8 @@ Three ",
|
||||
top.Add (otherView);
|
||||
Application.Begin (top);
|
||||
|
||||
cb.SetSource (source);
|
||||
|
||||
Assert.True (cb.HasFocus);
|
||||
Assert.Equal (-1, cb.SelectedItem);
|
||||
Assert.Equal (string.Empty, cb.Text);
|
||||
@@ -833,7 +834,7 @@ Three ",
|
||||
|
||||
cb.OpenSelectedItem += (s, _) => opened = true;
|
||||
|
||||
Assert.True (Application.OnKeyDown (Key.Enter));
|
||||
Assert.False (Application.OnKeyDown (Key.Enter));
|
||||
Assert.False (opened);
|
||||
|
||||
cb.Text = "Tw";
|
||||
|
||||
Reference in New Issue
Block a user