WxPthon 问题:笔记本面板中的子面板

发布于 2024-11-19 20:15:02 字数 478 浏览 1 评论 0原文

我目前是一名暑期研究生,帮助进行计算生物学研究,我的职责是制作一个可视化数据的 GUI。目前,我正在使用 wxPython 和 matplotlib。我在笔记本中设置了两个面板 - 第一个面板是选项,第二个面板是可视化所在的位置。然而,此外我希望第二个面板包含四个子面板 - 因此每个子面板中都有一个图表。不过,当我尝试将子面板添加到第二个面板时,它们似乎没有显示。任何意见或建议将不胜感激。

谢谢你!

这就是我的目标 - 目前可视化面板是空白的:
我的理想计划

http://imageshack.us/photo/my-images/834/cuffvis2ideal.jpg/

I am currently a summer research student helping out with computational biology research, and my role is to make a GUI that visualizes data. At the moment, I am using wxPython and matplotlib. I have two panels set up within a notebook - the first panel is the options and the second panel is where the visualization will be. However, in addition I would like the second panel to contain four subpanels within it--so it has a graph in each subpanel. Though, when I try to add subpanels to my secondpanel, they don't seem to show up. Any advice or suggestions would be appreciated.

Thank you!

Here is what my goal is - at the moment the Visualization panel is blank:
My Ideal Program

http://imageshack.us/photo/my-images/834/cuffvis2ideal.jpg/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

百思不得你姐 2024-11-26 20:15:02

首先,我认为在选项卡面板顶部创建面板没有任何意义。那是多余的。您可以仅使用选项卡的面板作为顶部面板并消除 selfPanel。然后,您可以创建 4 个其他面板,其父面板为“self”(即选项卡本身)。

您需要 3 个 BoxSizer 或 1 个 GridSizer。我个人喜欢使用 BoxSizer 的灵活性,但这取决于您。将面板放入尺寸调整器中,并将它们设置为 EXPAND,并将其比例设置为 1。类似于:

myBoxSizer.Add(panelOne, 1, wx.EXPAND|wx.ALL, 10)

应该可以。

First of all, I don't see any point in creating a panel on top of the tab's panel. That's redundant. You can just use the tab's panel as the top panel and eliminate selfPanel. Then you can just create 4 other panels with a parent of "self" (i.e. the tab itself).

You'll need 3 BoxSizers or 1 GridSizer. I personally like the flexibility of using the BoxSizers, but that's up to you. Put the panels in the sizers and set them to EXPAND and give them a proportion of 1. Something like:

myBoxSizer.Add(panelOne, 1, wx.EXPAND|wx.ALL, 10)

That should work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文