信息: 输入区(单个输入区对话框)和弹出通知(通知)
单个输入区对话框: appuifw.query()
以下这些行用来实现一个单独对话框,每一行使用不同的输入类型。他们都是使用了 appuifw 模块中的 .query() 函数。
appuifw.query(label,type)
其中 label 必须是 unicode 字符编码。 文本 data = appuifw.query(u"Type a word:", "text")

数字 data = appuifw.query(u"Type a number:", "number")

日期 data = appuifw.query(u"Type a date:", "date")

时间 data = appuifw.query(u"Type a time:", "time")

密码 data = appuifw.query(u"Type a code:", "code")

疑问 data = appuifw.query(u"Are you ok:", "query")

弹出消息: appuifw.note() 以下这些示例展示了弹出消息的不同类型:info, error, conf ,他们都使用 appuifw 模块中的 .note() 函数 appuifw.note(label, type) 其中 label 必须是unicode字符编码 示例代码: # Copyright (c) 2005 Jurgen Scheible # This script performs notes (pop-up notes) of different types: info, error, conf # It uses the .note() function of the appuifw module # appuifw.note(label, type) # import the application user interface framework module import appuifw # info: appuifw.note(u"Hello", "info") # error: appuifw.note(u"file not found", "error") # conf: appuifw.note(u"upload done", "conf") 信息 appuifw.note(u"Hello", "info")

错误 appuifw.note(u"file not found", "error")

返回状态 appuifw.note(u"upload done", "conf")
 |