How do I clear "gap" areas of a view when switching views? #757
Unanswered
brentmparker
asked this question in
Q&A
Replies: 1 comment
-
Not sure if it will help, but I am using some code from someone else's project and they include this code: async def _clear_screen(self) -> None:
# clears all the widgets from the screen..and re render them all
# Why? you ask? this was the only way at the time of this writing
if isinstance(self.view.layout, DockLayout):
self.view.layout.docks.clear()
self.view.widgets.clear() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on a simple test app that uses multiple views, swapping them out to switch screens. I'm using the director technique demonstrated in the bottom of discussion #182. The gif above demonstrates a few of the views.
As can be seen in the short gif, there are areas of the terminal that are not cleared when rendering a new view. Buttons from previous views are still drawn in gaps between widgets.
How can I force textual to completely clear the screen when views change so everything is overwritten?
Here's the basic code I'm using. It's similar to discussion 182, but I've been modifying it to try to fix my problem.
Beta Was this translation helpful? Give feedback.
All reactions