如何制作 easygui 多输入框?
如何制作一个 easygui Multienterbox,在一个窗口中包含以下所有问题?
namegui = easygui.enterbox(msg='Enter your name', title='Name query', default='Gian')
baigui = easygui.enterbox(msg='Enter your BAI', title='Burns Anxiety Inventory query', default='Gian')
bdcgui = easygui.enterbox(msg='Enter your BDC', title='Burns Depression Checklist query', default='Gian')
yeargui = easygui.enterbox(msg='Enter the current year', title='Current Year', default='2011')
monthgui = easygui.enterbox(msg='Enter the current month', title='Current Month')
daygui = easygui.enterbox(msg='Enter the current day', title='Current Day')
time_hourgui = easygui.enterbox(msg='Enter the current hour', title='Current Hour')
time_minutegui = easygui.enterbox(msg='Please enter current minutes', title='Current Minute')
am_pmgui = easygui.enterbox(msg='Please enter either am or pm', title='AM OR PM')
我在 Mac OS X Snow Leopard(10.6) 上使用 Python 2.5.1。
How do I make an easygui Multienterbox with all of the questions below in one window?
namegui = easygui.enterbox(msg='Enter your name', title='Name query', default='Gian')
baigui = easygui.enterbox(msg='Enter your BAI', title='Burns Anxiety Inventory query', default='Gian')
bdcgui = easygui.enterbox(msg='Enter your BDC', title='Burns Depression Checklist query', default='Gian')
yeargui = easygui.enterbox(msg='Enter the current year', title='Current Year', default='2011')
monthgui = easygui.enterbox(msg='Enter the current month', title='Current Month')
daygui = easygui.enterbox(msg='Enter the current day', title='Current Day')
time_hourgui = easygui.enterbox(msg='Enter the current hour', title='Current Hour')
time_minutegui = easygui.enterbox(msg='Please enter current minutes', title='Current Minute')
am_pmgui = easygui.enterbox(msg='Please enter either am or pm', title='AM OR PM')
I am using Python 2.5.1 on Mac OS X Snow Leopard(10.6).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
EasyGui 教程有一个关于使用
multienterbox
。您可以将所有字段名称放入列表中 (fieldNames = ['Name query','Burns Anxiety inventory query',...]
) 并将其传递到multienterbox
以及窗口标题 (title
) 和消息 (msg
):如果您仍然需要各个字段中的值,则可以解压元组:
The EasyGui Tutorial has a section on using
multienterbox
. You an put all of your field names in a list (fieldNames = ['Name query','Burns Anxiety inventory query',...]
) and pass it tomultienterbox
along with a window title (title
) and a message (msg
):If you still need the values in individual fields, you could then unpack your tuple:
这是工作示例
Here is the working example