From d8b4fd425c6ae627fcd8fe9479d5c7e203c64ac6 Mon Sep 17 00:00:00 2001 From: miguel Date: Fri, 28 Sep 2018 22:45:06 -0400 Subject: [PATCH] Containers that have a contentView where they host their children must override RemoveAll --- Terminal.Gui/Core.cs | 10 ++++++++++ Terminal.Gui/Views/ScrollView.cs | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/Terminal.Gui/Core.cs b/Terminal.Gui/Core.cs index b4b9db72d..c198aed1b 100644 --- a/Terminal.Gui/Core.cs +++ b/Terminal.Gui/Core.cs @@ -1417,6 +1417,16 @@ namespace Terminal.Gui { this.CanFocus = false; } + /// + /// Removes all widgets from this container. + /// + /// + /// + public override void RemoveAll () + { + contentView.RemoveAll (); + } + public override void Redraw (Rect bounds) { if (!NeedDisplay.IsEmpty) { diff --git a/Terminal.Gui/Views/ScrollView.cs b/Terminal.Gui/Views/ScrollView.cs index 99b239470..c85db8627 100644 --- a/Terminal.Gui/Views/ScrollView.cs +++ b/Terminal.Gui/Views/ScrollView.cs @@ -319,6 +319,15 @@ namespace Terminal.Gui { } } + /// + /// Removes all widgets from this container. + /// + /// + /// + public override void RemoveAll() + { + contentView.RemoveAll(); + } /// /// /// Gets or sets the visibility for the vertical scroll indicator.