Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Revision as of 17:05, 16 July 2008 by hartti (Talk | contribs)

Archived:Nested menus in PySymbian

From Wiki
Jump to: navigation, search

The code snippet will explain how to create a menu inside a menu which means when you click a option in the main menu then there will again a new window with different options.

import appuifw,e32   #importing the necessary modules
 
def quit(): #define the exit event
print "Exit Key Pressed"
app_lock.signal()
 
def tst():
print u"hi"
 
def bst():
print u"bye"
 
def tata():
appuifw.app.menu = [(u"yes",tst),(u"no",bst)]
appuifw.app.exit_key_handler = quit
 
 
def ford():
appuifw.app.menu = [(u"one",tst),(u"two",bst)]
appuifw.app.exit_key_handler = quit
 
 
appuifw.app.menu = [(u"Nano",tata),(u"Ikon",ford)]
 
 
appuifw.app.exit_key_handler = quit
app_lock = e32.Ao_lock()
app_lock.wait()

Here is the link to python discussion board were the topic is discussed.

81 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×