如何使用 Python/Glade 更改主窗口小部件?
我对 GUI 编程或多或少是个新手(只是有一点点 Perl/Tk 经验);我是 Python 新手,也是 Glade 新手,我想学习如何使用它们。
我心中有一个程序,需要一个窗口,但该窗口的内容(小部件和所有内容)必须随着用户完成的每一步而改变(就像在 Windows/Mac 的安装程序之一中,您不断单击“下一个”)。问题是,现在(在无代码阶段)我已经为如何解决这个问题而感到困惑。我尝试过谷歌搜索,但我似乎甚至不知道正确的关键字。如果这里有人可以帮助我提供涵盖“下一步”的教程链接或至少包含一两个有用的关键字,那就太好了。
预先非常感谢!
I am more or less new to GUI programming (just some tiny bit of Perl/Tk experience); I am new to Python, and I am new to Glade, both of which I would like to learn how to use.
I have a program in mind which would require one single window, but this window's contents (widgets and all) would have to change with each step that the user has completed (like in one of the installers for Windows/Mac where you keep clicking "Next"). The trouble is that already now (at the no-code-stage) I am stumped for how to tackle this. I have tried googling, but I don't seem to even know the right keywords. It would be great if someone on here could help me out with a link to a tutorial covering that "Next-thing" or at least with one or two helpful keywords.
Thanks a lot in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Glade 允许您创建部分窗口。示例:您可以使用所需的内容创建许多
GtkVBox
,然后在运行时在它们之间进行交换。事实上,glade 已经包含了
GtkAssistant
,“一种用于引导用户完成多步骤操作的小部件。它包括用于轻松实现“下一步-下一步-完成”样式对话框的工具。每个步骤通常由一个助手页面处理。助手控制页面流收集必要的数据来完成应用程序任务。”尝试使用它,并告诉我们它是如何进行的,如果您有问题,最好通过询问另一个更具体的问题。
Glade allows you to create partial windows. Example: You can create many
GtkVBox
'es with the contents you want, and then in runtime swap between them.In fact, glade already includes
GtkAssistant
, "a widget used to guide users through multi-step operations. It includes tools to ease implementing the "next-next-finish" style of dialogs. Each step is generally handled by one assistant page. The assistant controls the page flow to collect the necessary data to complete the application task."Try to use it, and tell us how it goes, preferably by asking another, more specific question, if you have problem.