首 页 | 新 闻 | Symbian | Android| Windows Mobile | J2ME | 下载中心 | 游戏策划招聘与求职 | 购书指南 | 视频教程
您现在的位置: 开发视界 >> Symbian >> 用户界面 >> 正文
S60 Python 编程指南——对话框和通知信息
作者:佚名    文章来源:转载    更新时间:2007-1-6 10:19:16

信息: 输入区(单个输入区对话框)和弹出通知(通知)

单个输入区对话框: 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")
返回状态

相关文章:
Symbian中的错误码代号
在Symbian exe 程序中显示图形
S60 Python 编程指南——程序菜单练习(2)
Symbian OS程序设计笔记——开发环境的建立
对C++中的文件进行读写操作
S60 Python 编程指南——弹出菜单和选择列表
S60 Python 编程指南——弹出列表
S60 Python 编程指南——文本输入练习(一)
 

站点地图 | 加入收藏 | 联系站长 | 广告服务 |
QQ:280529124  Tel:0592-8271361 辽ICP备05021703号