Archived:How to add a submenu in PySymbian

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngAquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.

Acredita-se que este artigo ainda seja válido no contexto original (quando ele foi escrito)

Article Metadata
Tested with
Devices(s): Nokia N96
Platform(s): S60 2nd Edition, S60 3rd Edition
Platform Security
Capabilities: )
Keywords: appuifw, menu
Created: cyke64 (15 Mar 2007)
Last edited: hamishwillee (31 May 2013)


Python can use submenu in menu options but it can be difficult to remember how to use them !

  • Item 1
  • Submenu
    • Item 2
    • Item 3

Identation has been used for a better understanding. Don't mismatch the parentheses ! Item2 and item3 will be displayed on screen only when you click on submenu.


#import module
import appuifw
# create menu
appuifw.app.menu = [(u"item 1", item1_cb),
(u"Submenu", (
(u"sub item 2", subitem2_cb),
(u"sub item 3", subitem3_cb)
# item1_cb, subitem2_cb, subitem3_cb are callback


Here is a screenshot to illustrate this submenu.

SubMenu Items

Related Links

This page was last modified on 31 May 2013, at 01:08.
59 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.