Browse Source

Containers that have a contentView where they host their children must override RemoveAll

miguel 6 years ago
parent
commit
d8b4fd425c
2 changed files with 19 additions and 0 deletions
  1. 10 0
      Terminal.Gui/Core.cs
  2. 9 0
      Terminal.Gui/Views/ScrollView.cs

+ 10 - 0
Terminal.Gui/Core.cs

@@ -1417,6 +1417,16 @@ namespace Terminal.Gui {
 				this.CanFocus = false;
 		}
 
+		/// <summary>
+		///   Removes all widgets from this container.
+		/// </summary>
+		/// <remarks>
+		/// </remarks>
+		public override void RemoveAll ()
+		{
+			contentView.RemoveAll ();
+		}
+
 		public override void Redraw (Rect bounds)
 		{
 			if (!NeedDisplay.IsEmpty) {

+ 9 - 0
Terminal.Gui/Views/ScrollView.cs

@@ -319,6 +319,15 @@ namespace Terminal.Gui {
 			}
 		}
 
+		/// <summary>
+		///   Removes all widgets from this container.
+		/// </summary>
+		/// <remarks>
+		/// </remarks>
+		public override void RemoveAll()
+		{
+			contentView.RemoveAll();
+		}
 
 		/// <summary>
 		/// /// Gets or sets the visibility for the vertical scroll indicator.