Why Does .Hide()ing and .Show()ing Panels in wxPython Result in the Sizer Changing the Layout?

前端 未结 2 1300
不思量自难忘°
不思量自难忘° 2021-02-03 10:08

As referenced in my previous question, I am trying to make something slightly wizard-like in function. I have settled on a single frame with a sizer added to it. I build panel

2条回答
  •  醉梦人生
    2021-02-03 10:50

    Yeah, I know this is already answered, but here you go anyway:

    You should only have to call Layout() on the panel's parent, so something like self.GetParent().Layout() should do the trick. See this article: http://www.blog.pythonlibrary.org/2010/06/16/wxpython-how-to-switch-between-panels/

    If you want the buttons to always show, create two panels in one vertical sizer. The one on top will show your panels and the one on the bottom will show the buttons. Then use PubSub or something to communicate between them.

提交回复
热议问题