Browse Source

ComboBox: Refactor. Resize Width working

Ross Ferguson 5 years ago
parent
commit
6f94a776fd
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Example/demo.cs
  2. 1 1
      UICatalog/Scenarios/ListsAndCombos.cs

+ 1 - 1
Example/demo.cs

@@ -435,7 +435,7 @@ static class Demo {
 		}
 		}
 		var list = new ComboBox () { X = 0, Y = 0, Width = 36, Height = 7 };
 		var list = new ComboBox () { X = 0, Y = 0, Width = 36, Height = 7 };
 		list.SetSource(items.ToList());
 		list.SetSource(items.ToList());
-		list.Changed += (object sender, ustring text) => { Application.RequestStop (); };
+		list.SelectedItemChanged += (object sender, ustring text) => { Application.RequestStop (); };
 
 
 		var d = new Dialog ("Select source file", 40, 12) { list };
 		var d = new Dialog ("Select source file", 40, 12) { list };
 		Application.Run (d);
 		Application.Run (d);

+ 1 - 1
UICatalog/Scenarios/ListsAndCombos.cs

@@ -53,7 +53,7 @@ namespace UICatalog.Scenarios {
 			};
 			};
 			comboBox.SetSource (items);
 			comboBox.SetSource (items);
 
 
-			comboBox.Changed += (object sender, ustring text) => lbComboBox.Text = text;
+			comboBox.SelectedItemChanged += (object sender, ustring text) => lbComboBox.Text = text;
 			Win.Add (lbComboBox, comboBox);
 			Win.Add (lbComboBox, comboBox);
 		}
 		}
 	}
 	}