How do I stop artifacts from WXWidgets sizer being redrawn?

不打扰是莪最后的温柔 提交于 2020-01-24 00:28:49

问题


I have a setup like this:

Frame->Panel->BoxSizer
The BoxSizer has 2 BoxSizers that are hidden at launch:
EditBoxSizer->FlexSizer with some inputs.
GridBoxSizer->Grid

GridBoxSizer has a grid.

EditBoxSizer is simply a few static texts and input boxes.

GridBoxSizer and EditBoxSizer are never shown at the same time. So each always gets 100% of the sizer space.

When EditBoxSizer is displayed, GridBoxSizer is hidden. It works perfect.

When EditBoxSizer is hidden, GridSizer is shown. However I can see the StaticText and Input box artifacts from EditBoxSizer over the grid.

If I minimize and restore the window, it looks perfect.

I feel like I've tried everything:

Hiding all the various sizers and panels then running layout() then showing them. Showing the panel and sizer then running layout() Not hiding the panel.

What is the proper method of redrawing a BoxSizer that is completely being redrawn?

I'm using wxgo, but you can answer in WxWidgets or WxPython and I can translate.

来源:https://stackoverflow.com/questions/59585773/how-do-i-stop-artifacts-from-wxwidgets-sizer-being-redrawn

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!