S60 Python 编程指南——对话框和通知信息
来源:百度文库 编辑:神马文学网 时间:2024/04/29 08:52:29
信息: 输入区(单个输入区对话框)和弹出通知(通知)
单个输入区对话框: 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")
单个输入区对话框: 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")
S60 Python 编程指南——对话框和通知信息
S60 Python 编程指南——语法
S60 Python 编程指南——定义函数
XML Python 联合编程
Python 自省指南
Python 自省指南
《Python编程金典》读书笔记
Nokia S60编程环境的建立
参考咨询和信息服务人员行为指南
S60平台:使用DBMS APIs —DBMS的管理结构和元素(1)
S60平台:使用DBMS APIs —DBMS的管理结构和元素(2)
S60平台:使用DBMS APIs —DBMS的管理结构和元素(3)
S60平台:使用DBMS APIs —DBMS的管理结构和元素(1)
S60平台:使用DBMS APIs —DBMS的管理结构和元素(2)
S60平台:使用DBMS APIs —DBMS的管理结构和元素(3)
Re: [python-chinese] 关于python库指南的阅读
S60平台:使用DBMS APIs —总论
Web Service深度编程——Axis序列化/反序列化器开发指南
Web Service深度编程——Axis序列化/反序列化器开发指南
对话框
Symbian编程三部曲—明确开发对象,SDK工具下载指南
[转帖]C 编程指南
网络socket编程指南
游戏编程指南