开发学院手机开发Symbian 开发 Symbian S60 Python 编程指南 如何创建一个应用程... 阅读

Symbian S60 Python 编程指南 如何创建一个应用程序

 2010-08-30 00:06:00 来源:WEB开发网   
核心提示:Python代码import appuifwimport e32def exit_key_handler():app_lock.signal()# define a callback functiondef shout():index = lb.current()print indexprint entries[ind

Python代码

import appuifw

import e32

def exit_key_handler():

app_lock.signal()

# define a callback function

def shout():

index = lb.current()

print index

print entries[index]

# create your content list of your listbox including the icons to be used for each entry

entries = [u"Signal",u"Battery"]

lb = appuifw.Listbox(entries,shout)

# create an Active Object

app_lock = e32.Ao_lock()

# create an instance of appuifw.Listbox(), include the content list "entries" and the callback function "shout"

# and set the instance of Listbox now as the application body

appuifw.app.body = lb

appuifw.app.exit_key_handler = exit_key_handler

app_lock.wait()

import appuifw

import e32

def exit_key_handler():

app_lock.signal()

# define a callback function

def shout():

index = lb.current()

print index

print entries[index]

# create your content list of your listbox including the icons to be used for each entry

entries = [u"Signal",u"Battery"]

lb = appuifw.Listbox(entries,shout)

# create an Active Object

app_lock = e32.Ao_lock()

# create an instance of appuifw.Listbox(), include the content list "entries" and the callback function "shout"

# and set the instance of Listbox now as the application body

appuifw.app.body = lb

appuifw.app.exit_key_handler = exit_key_handler

app_lock.wait()

Python代码

# body as Text:

appuifw.app.body = appuifw.Text(u'hello')

# body as Text:

appuifw.app.body = appuifw.Text(u'hello')

示例代码:

------------------------------------------------

上一页  1 2 3 4 5 6 7 8 9 10  下一页

Tags:Symbian Python 编程

编辑录入:coldstar [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接