lawsie / guizero

A Python 3 library to allow learners to quickly and easily create GUIs.
https://lawsie.github.io/guizero
BSD 3-Clause "New" or "Revised" License
406 stars 81 forks source link

Showing and hiding large numbers of elements causes black screen #496

Open atkeeley opened 11 months ago

atkeeley commented 11 months ago

Describe the bug Showing and hiding large numbers of elements causes a black screen. Clicking anywhere on the screen seems to fix it each time.

To Reproduce Steps to reproduce the behaviour: In my case, this manifests as a gui with two tabs, clicking a tab hides the box for the other tab (and all of its children) and shows a different box (and all of its children). Adding a step to .update() the app does not seem to help or change the behavior.

Expected behaviour Elements containing many other elements should hide and show as intended, without disappearing.

System information:

martinohanlon commented 11 months ago

This is unlikely to be a guizero bug. tkinter / [the OS] is responsible for all the rendering of GUI.

My only suggestion was to call app.update() after making the change. A super hacky approach may also be to schedule a call to app.update using .after after a short time (e.g. 100 ms).

I would not surprised if this is a macOS only issue.