gpt4 book ai didi

python - 无法在 Python Tkinter 中制作类似容器的桌面

转载 作者:行者123 更新时间:2023-12-04 16:50:24 27 4
gpt4 key购买 nike

我需要用 Python 制作一个桌面容器框架,这样我就可以从菜单栏中选择窗口将在该桌面 Pane 中打开的选项,就像我们用来处理专业应用程序一样。

这是 GUI 的快照。在快照中,上面的菜单栏也有很多级联选项。 As the User choose the cascaded option, a new window should open below the Menu bar (Empty space in snap), and when the other option is chosen the previous frame should also be there and these sub frames should also have close,minimize and maximize按钮(例如 Minimize 最小化到状态栏上方框架空间的底部

May Application

最佳答案

您正在尝试创建通常称为“多文档界面”或 MDI 的内容。这在 80 年代和 90 年代初期很流行,但现在普遍认为可用性很差。

Tkinter 本身不支持 MDI 应用程序。您将必须自己完成所有窗口管理。通常这意味着您将为包含窗口使用 Canvas ,然后在 Canvas 中嵌入框架来表示您的窗口。您必须绘制自己的窗口边框并调整大小。我已经看到它完成了,但通常不值得付出努力去实现。

关于python - 无法在 Python Tkinter 中制作类似容器的桌面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15998191/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com