Advertisement
here2share

# skeleton_layout.py

May 18th, 2015
470
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # skeleton_layout.py
  2.  
  3. ######  import all modules needed
  4. import appuifw
  5. import e32
  6.  
  7. ###### set the screen size (in this example, to large)
  8. appuifw.app.screen='large'
  9.  
  10. ###### create a menu and the callback functions for the menu
  11. def function_A():
  12.     print "function_A"
  13.  
  14. def function_B():
  15.     print "function_B"
  16.  
  17. def function_C():
  18.     print "function_C"
  19.  
  20. appuifw.app.menu = [(u"Function A", function_A),(u"Function B", function_B),(u"Function C", function_C)]
  21.  
  22. ##### create and set an exit key handler
  23. def exit_key_handler():
  24.     app_lock.signal()
  25.     ### appuifw.app.set_exit()
  26.  
  27. ##### set the title
  28. appuifw.app.title = u"New Title"
  29.  
  30. #####
  31. app_lock = e32.Ao_lock()
  32. appuifw.app.exit_key_handler = exit_key_handler
  33. app_lock.wait()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement