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

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

 2010-08-30 00:06:00 来源:WEB开发网   
核心提示:# put the application screen size to full screenappuifw.app.screen='full' #(a full screen)# other options:#appuifw.app.screen='normal' #(a norma

# 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()

3,如何创建你程序的逻辑结构?

这个完整的指南就是关于这个问题的…… 你必须确定一些逻辑结构使你的程序运行起来,任何逻辑结构都有可能!

4,如何创建一个应用程序菜单?

一个应用程序菜单使用左边的软按键并使得在你的应用程序运行时总是更够被使用。一个应用程序菜单也能包含子菜单。

Python代码

# create the callback functions that shall be executed when when selecting an item in

# the menu:

def item1():

print "item one"

def subitem1():

print "subitem one"

def subitem2():

print "subitem two"

# create the menu using appuifw.app.menu[(title, callback1), (title, (subtitle, callback2))]

appuifw.app.menu = [(u"item 1", item1), (u"Submenu 1", ((u"sub item 1"

, subitem1),(u"sub item 2", subitem2)))]

# create the callback functions that shall be executed when when selecting an item in

# the menu:

def item1():

print "item one"

def subitem1():

print "subitem one"

def subitem2():

print "subitem two"

# create the menu using appuifw.app.menu[(title, callback1), (title, (subtitle, callback2))]

appuifw.app.menu = [(u"item 1", item1), (u"Submenu 1", ((u"sub item 1"

, subitem1),(u"sub item 2", subitem2)))]

示例代码:

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

Python代码

import appuifw

import e32

上一页  1 2 3 4 5 6 7  下一页

Tags:Symbian Python 编程

编辑录入:coldstar [复制链接] [打 印]
赞助商链接