Python/Tkinter:打包 grid_remove() 的等价物,例如。 pack_remove()?
是否有一个相当于 grid_remove() 方法的包,其中小部件的原始 pack() 设置在 re-pack() 上恢复?
用例:当我显示已通过 pack_forget() 隐藏的打包小部件时,我希望在发出 widget.pack() 显示请求时使用其原始包设置重新打包该小部件。
Is there a pack equivalent of the grid_remove() method where a widget's original pack() settings are restored on a re-pack()?
Use case: When I show a packed widget that has been hidden via pack_forget(), I would like to have the widget re-packed with its original pack settings when I issue the widget.pack() show request.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,没有同等的东西。只有
pack_forget
不记得恢复时小部件在哪里。如果我需要这种功能,我只需使用网格几何管理器。No, there is no equivalent. There is only
pack_forget
which doesn't remember where the widget was when you restore it. If I need this sort of feature I just use the grid geometry manager.