Prechádzať zdrojové kódy

Fixed CanFocus not being true by default for TableView

tznind 4 rokov pred
rodič
commit
74d4d1b895

+ 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);
 		}