Symbian S60 Python 编程指南 如何创建一个应用程序
2010-08-30 00:06:00 来源:WEB开发网1,插入所有需要的模块
2,设定屏幕大小 (normal, large, full)
3,编写你程序的逻辑代码
4,创建一个程序菜单(如果有必要)
5,设定一个离开的按键
6,设定程序标题
7,如果有必要,分配活动的对象
8,设定程序主题(文字,背景,列表或什么都没有)
9,创建一个恰当的主循环体
1,如何装如所需要的所有模块?
Python代码
import appuifw
import e32
import appuifw
import e32
2,如何设定屏幕大小?
Python代码
# screen has 3 different values:
appuifw.app.screen='normal' #(a normal screen with title pane and softkeys)
appuifw.app.screen='large' #(only softkeys visible)
appuifw.app.screen='full' #(a full screen)
# screen has 3 different values:
appuifw.app.screen='normal' #(a normal screen with title pane and softkeys)
appuifw.app.screen='large' #(only softkeys visible)
appuifw.app.screen='full' #(a full screen)
示例代码:
---------------------------------
Python代码
import appuifw
import e32
def exit_key_handler():
app_lock.signal()
round = appuifw.Text()
round.set(u'hello')
# put the application screen size to full screen
appuifw.app.screen='full' #(a full screen)
# other options:
#appuifw.app.screen='normal' #(a normal screen with title pane and softkeys)
#appuifw.app.screen='large' #(only softkeys visible)
app_lock = e32.Ao_lock()
appuifw.app.body = round
appuifw.app.exit_key_handler = exit_key_handler
app_lock.wait()
import appuifw
import e32
def exit_key_handler():
app_lock.signal()
round = appuifw.Text()
round.set(u'hello')
更多精彩
赞助商链接