如何在 Perl/Tk PanedWindows 中保持相对大小
我正在开发 Perl/Tk GUI。它将包含三个主要领域。其中两个并排在上面,然后另一个在两个下面。
我可以使用网格几何管理。上面两个的行权重为 2。下面两个的行权重为 1。
这对于起始位置很有好处,但用户需要能够调整大小。
查看Tk文档,PanedWindows也可以有权重,但我不知道如何访问它。
正如我现在所拥有的,在我的窗格框架中,上部和左侧的子级是最小尺寸,其他所有内容都填充了下方和右侧的区域。如果我调整主窗口。仅调整下方和右侧窗口的大小。最糟糕的是,我可以调整窗口大小并使一些孩子消失。
我想保持当前的相对大小。
我该怎么做?我不受窗格、网格、包装的束缚。不管怎样都有效。
I'm working on a Perl/Tk GUI. It will have three main areas. Two of them side by side on top and then another one below the two.
I could just use grid geometry management. The upper two would have a row weight of 2. The lower one would have a weight of 1.
This would be good for the starting position, but the user needs the ability to adjust the sizes.
Looking at the Tk documentation, PanedWindows can also have a weight, but I can't figure out how to access it.
As I have it now, with my Paned frames, the upper and left children are minimum size, everthing else fills the area below and to the right. If I adjust the main window. only the lower and right windows are resize. Worst of all, I can resize the window and make some of the children disappear.
I want to maintain the current relative sizes.
How do I do this? I'm not tied to paned, grid, pack. Whatever works.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来你在 Tk 中使用框架。虽然我从未使用过 Perl/Tk,但我对 html 很了解,Tk 可能是基于 html 的。因此,您可能需要查看 W3C 网站上的 HTML 文档中的框架。
听起来您需要 1 个框架集,其中 2 个框架用于顶部,另一个框架用于底部。
我希望这会有所帮助。
Sounds like you are using frames in Tk. While I have never used Perl/Tk, I am kind of savy html which Tk is probably based on html. So, you might want to look into frames and framesets at Frames in HTML documents on the W3C site.
It sounds like you need 1 frameset with 2 frames for the top and another frame for the bottom.
I hope that this helps.