Symbian S60 Python 编程指南 如何创建一个应用程序
2010-08-30 00:06:00 来源:WEB开发网Python代码
import appuifw
import e32
def exit_key_handler():
app_lock.signal()
# create an instance of appuifw.Text()
round = appuifw.Text()
# change the style of the text
round.style = appuifw.STYLE_UNDERLINE
# set the text to 'hello'
round.set(u'hello')
# put the screen size to full screen
appuifw.app.screen='full'
# create an Active Object
app_lock = e32.Ao_lock()
# set the application body to Text
# by handing over "round" which is an instance of appuifw.Text() as definded above
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()
# create an instance of appuifw.Text()
round = appuifw.Text()
# change the style of the text
round.style = appuifw.STYLE_UNDERLINE
# set the text to 'hello'
round.set(u'hello')
# put the screen size to full screen
appuifw.app.screen='full'
# create an Active Object
app_lock = e32.Ao_lock()
# set the application body to Text
# by handing over "round" which is an instance of appuifw.Text() as definded above
appuifw.app.body = round
appuifw.app.exit_key_handler = exit_key_handler
app_lock.wait()
Python代码
# body as Canvas:
appuifw.app.body=appuifw.Canvas(event_callback=None, redraw_callback=handle_redraw)
# body as Canvas:
appuifw.app.body=appuifw.Canvas(event_callback=None, redraw_callback=handle_redraw)
示例代码:
---------------------------------------------
Python代码
# Copyright (c) 2005 Jurgen Scheible
更多精彩
赞助商链接