Ver Fonte

Fixed CanFocus not being true by default for TableView

tznind há 4 anos atrás
pai
commit
74d4d1b895
2 ficheiros alterados com 2 adições e 3 exclusões
  1. 2 1
      Terminal.Gui/Views/TableView.cs
  2. 0 2
      UICatalog/Scenarios/TableEditor.cs

+ 2 - 1
Terminal.Gui/Views/TableView.cs

@@ -79,7 +79,7 @@ namespace Terminal.Gui.Views {
 		/// Initialzies a <see cref="TableView"/> class using <see cref="LayoutStyle.Computed"/> layout. 
 		/// </summary>
 		/// <param name="table">The table to display in the control</param>
-		public TableView (DataTable table) : base ()
+		public TableView (DataTable table) : this ()
 		{
 			this.Table = table;
 		}
@@ -89,6 +89,7 @@ namespace Terminal.Gui.Views {
 		/// </summary>
 		public TableView () : base ()
 		{
+			CanFocus = true;
 		}
 
 		///<inheritdoc/>

+ 0 - 2
UICatalog/Scenarios/TableEditor.cs

@@ -48,8 +48,6 @@ namespace UICatalog.Scenarios {
 				Width = Dim.Fill (),
 				Height = Dim.Fill (),
 			};
-			tableView.CanFocus = true;
-
 
 			Win.Add (tableView);
 		}