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. Thanks for all your past and future contributions.

Archived:How to add a submenu in PySymbian

From 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 = [(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.
70 page views in the last 30 days.