mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-30 01:38:01 +01:00
ComboBox multiple fixes. Dim.Fill() incorrectly calculated. List height not resizing. SetSource() not immeadiately updating list. Double click not selecting item. Example now demo resizes with view
This commit is contained in:
@@ -459,11 +459,12 @@ static class Demo {
|
||||
.OrderBy (x => x).ToList ();
|
||||
}
|
||||
}
|
||||
var list = new ComboBox () { X = 0, Y = 0, Width = Dim.Fill(), Height = Dim.Fill() };
|
||||
var list = new ComboBox () { Width = Dim.Fill(), Height = Dim.Fill() };
|
||||
list.SetSource(items.ToList());
|
||||
list.SelectedItemChanged += (object sender, ustring text) => { Application.RequestStop (); };
|
||||
|
||||
var d = new Dialog ("Select source file", 40, 12) { list };
|
||||
var d = new Dialog () { Title = "Select source file", Width = Dim.Percent (50), Height = Dim.Percent (50) };
|
||||
d.Add (list);
|
||||
Application.Run (d);
|
||||
|
||||
MessageBox.Query (60, 10, "Selected file", list.Text.ToString() == "" ? "Nothing selected" : list.Text.ToString(), "Ok");
|
||||
|
||||
Reference in New Issue
Block a user