使用 wxFormBuilder for python 创建多个类

发布于 2024-11-20 00:29:47 字数 337 浏览 4 评论 0 原文

我正在使用 wxFormBuilder 编写一系列 GUI 应用程序。到目前为止,它运行得非常好,但其主页上的文档链接已损坏。

我想做的是将我的程序合并为一个程序,每个程序作为 wxNotebook 中的不同选项卡。然而,我只能让 wxFormBuilder 生成一个类,即我的框架的类。理想情况下,我希望每个面板都有自己的类,这样我就可以单独重写每个类,而不会被一个包含 5 个不同应用程序的所有事件处理程序的巨型类所困扰。

这可以用 wxFormBuilder 实现吗?是否有其他程序可以让我更轻松地做到这一点?

我对其他 wx 程序持开放态度,但无法离开 Python,而且我真的不想手动编写 wx 代码。

I'm using wxFormBuilder to write a series of GUI applications. So far it has worked wonderfully, but the documentation on their homepage is a broken link.

What I'd like to do is combine my programs into one program, each as a different tab in a wxNotebook. However, I can only get wxFormBuilder to generate one class, the class for my frame. Ideally, what I'd like is for each panel to be its own class, so then I can override each class individually, and not be stuck with one giant class which contains all the event handlers for 5 different applications.

Is this possible with wxFormBuilder? Is there a different program which would allow me to do this more easily?

I'm open to other wx programs, but can't departure from Python, and I'd really rather not have to write the wx code by hand.

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

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

发布评论

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

评论(1

╄→承喏 2024-11-27 00:29:48

有些人喜欢 wxGlade、Boa Constructor(旧)或 XRCed(包含在 wxPython 中)。你可以尝试一下。我听说过有关 wxFormBuilder 的好消息,所以我有点惊讶它没有这种功能。以下是一些链接: http://www.oneminitpython.com/

http://sturlamolden.blogspot.com/2008/03/howto-using-wxformbuilder-with-wxpython.html

http://www.blog.pythonlibrary.org/2010/05/11/wxpython-an-introduction-to-xrc/

希望有所帮助。

Some people like wxGlade, Boa Constructor (old) or XRCed (included with wxPython). You might experiment with those. I've heard good things about wxFormBuilder, so I'm a little surprised it doesn't have that capability. Here are some links: http://www.oneminutepython.com/

http://sturlamolden.blogspot.com/2008/03/howto-using-wxformbuilder-with-wxpython.html

http://www.blog.pythonlibrary.org/2010/05/11/wxpython-an-introduction-to-xrc/

Hope that helps a little.

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