Symbian S60 Python 编程指南 如何创建一个应用程序
2010-08-30 00:06:00 来源:WEB开发网def exit_key_handler():
app_lock.signal()
# create the callback functions for the application menu and its submenus
def item1():
print ""
round.set(u'item one was selected')
def subitem1():
print ""
round.set(u'subitem one was selected')
def subitem2():
round.set(u'subitem two was selected')
app_lock = e32.Ao_lock()
round = appuifw.Text()
round.set(u'press options')
appuifw.app.screen='large'
appuifw.app.body = round
# create the application menu including submenus
appuifw.app.menu = [(u"item 1", item1),
(u"Submenu 1", ((u"sub item 1", subitem1),
(u"sub item 2", subitem2)))]
appuifw.app.exit_key_handler = exit_key_handler
app_lock.wait()
import appuifw
import e32
def exit_key_handler():
app_lock.signal()
# create the callback functions for the application menu and its submenus
def item1():
print ""
round.set(u'item one was selected')
def subitem1():
print ""
round.set(u'subitem one was selected')
def subitem2():
round.set(u'subitem two was selected')
app_lock = e32.Ao_lock()
round = appuifw.Text()
round.set(u'press options')
appuifw.app.screen='large'
appuifw.app.body = round
# create the application menu including submenus
appuifw.app.menu = [(u"item 1", item1),
(u"Submenu 1", ((u"sub item 1", subitem1),
(u"sub item 2", subitem2)))]
appuifw.app.exit_key_handler = exit_key_handler
app_lock.wait()
5,如何设定一个离开程序的键盘操作?
当你按下右键(即离开)时,离开的操作就会被执行。使用特别定义的一个函数,你就能定义在按下键时要做什么。
更多精彩
赞助商链接