English 中文(简体)
我怎样做一个轻松的多功能箱子?
原标题:How do I make an easygui Multi Enter Box?

www.un.org/Depts/DGACM/index_spanish.htm 我如何在一个窗口中简便地把所有问题放在一个窗口中?

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 )

www.un.org/Depts/DGACM/index_spanish.htm 我在MacOS Xnow Leopard(10.6)上使用了2.5.1。

最佳回答

EasyGui Tutorial有一节使用multienter/code>。 您在一份清单(fieldNames=[名称查询, Burns Anxiety list query ,...],将其通过至multienter Box,同时附上一份窗口标题( entitled)和一份信息(msg):

fieldValues = multenterbox(msg,title, fieldNames)

如果您仍需要各个领域的价值观,那么你可以总结一下:

# include one variable name for each value in fieldValues
namegui, baigui, bdcgui = fieldValues
问题回答

这方面的工作实例

def GetNameconfig():
   name = "TestInputValue"
   return name


defaultName = GetNameconfig()
msg = "Enter your personal information"
title = "Credit Card Application"
fieldNames = ["Name","Street Address","City","State","ZipCode"]
fieldValues = [defaultName, "Hauptstr. 1", "", "Germany", ""]
box = eg.multenterbox(msg,title, fieldNames, fieldValues)
print("Reply was: %s" % str(fieldValues))




相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...