×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    May 2006
    Posts
    72

    Smile How Can I Handle The Menu Screen.

    Hi Yucca,

    I want to handle the screen menu of Nokia 6680,N70 etc. how can i detect when that menu is off or on. so please give me an idea .

    i read maximum thread of forum but i did not find my solution so pls help me.

    Its Urgent,

    Thanx in Advance.

    Regards

    Ashutosh.

  2. #2
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: How Can I Handle The Menu Screen.

    Hi ashutosh12,

    I'm not sure to understand what you need. If you want to check if a menu is set or not you can do as below:

    Code:
    import appuifw
    
    ...
    
    print appuifw.app.menu
    
    menu = [(u'Item0', lambda:None),
            (u'Item1', lambda:None),
            (u'Item2', lambda:None),
            (u'Item3', lambda:None)]
    
    appuifw.app.menu = menu
    
    print appuifw.app.menu
    
    ...
    LFD
    Devices:
    Nokia E61 3rd Edition - pys60 1.4.0

    Tips and modules:
    http://www.lfdm.net/thesis

  3. #3
    Regular Contributor
    Join Date
    May 2006
    Posts
    72

    Re: How Can I Handle The Menu Screen.

    at first thanx for ur reply,

    but i m not understanding ur code. please explain it.

    My requirement is "how can detect the screen menu bar is on or off in 6680 or N70 like these phones. screen menu bar which is placed on the main window of these phones".

    This menu bar contains 5 items generally.

    pls help me

    it is very urgent for me .

    again thanx for ur reply.

    regards
    ashutosh

    sir if u can give me some example then this is my email-id
    ashutosh.sinha.25@gmail.com

  4. #4
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: How Can I Handle The Menu Screen.

    ashutosh12,

    The menu you refer to are the tabs in the navigation pane. The source below show you how it works.

    Also their are no methods in appuifw.app that retrieve the current active tab nether if this menu is displayed. But on the other hand I'm not sure this would be that useful since everything can be handled in the source.

    Code:
    import e32, appuifw
    
    # Just a dummy handler...
    def menu_action( aIndex ):
        print "menu: ", aIndex
    
    # aIndex receives the index of the tab to activate
    def tabs_handler( aIndex ):
        # activate the right tab
        appuifw.app.activate_tab( aIndex )
        e32.ao_yield()
    
        # TODO: implement the views
        if aIndex == 0:
            appuifw.app.body = VIEW0
        elif aIndex == 1:
            appuifw.app.body = VIEW1
        elif aIndex == 2:
            appuifw.app.body = VIEW2
        elif aIndex == 3:
            appuifw.app.body = VIEW3
        elif aIndex == 4:
            appuifw.app.body = VIEW4
    
    # Exit handler
    def __exit__():
        # desable tabs
        appuifw.app.set_tabs( [], [] )
    
        # release the lock
        APP_LOCK.signal()
    
    
    if __name__ == "__main__":
    
        # create an active object
        APP_LOCK = e32.Ao_lock()
    
        # set title
        appuifw.app.title = u"Menu and tabs"
    
        # set exit handler
        appuifw.app.exit_key_handler = __exit__
    
        VIEW0 = appuifw.Text(u'View0')
        VIEW1 = appuifw.Text(u'View1')
        VIEW2 = appuifw.Text(u'View2')
        VIEW3 = appuifw.Text(u'View3')
        VIEW4 = appuifw.Text(u'View4')
    
    
        # define a menu structure
        menu = [( u'Item0', lambda:menu_action(0) ),
                ( u'Item1', lambda:menu_action(1) ),
                ( u'Item2', lambda:menu_action(2) ),
                ( u'Item3', lambda:menu_action(3) )]
    
        # set the menu  (Options button)
        appuifw.app.menu = menu
        # get an print the menu
        # print appuifw.app.menu
    
        # define tabs
        tabs = [u't0', u't1', u't2', u't3', u't4']
    
        # set tabs and it callback
        appuifw.app.set_tabs( tabs, tabs_handler )
    
        # set view to the app body
        appuifw.app.body = VIEW0
    
        APP_LOCK.wait()
    LFD
    Devices:
    Nokia E61 3rd Edition - pys60 1.4.0

    Tips and modules:
    http://www.lfdm.net/thesis

  5. #5
    Regular Contributor
    Join Date
    May 2006
    Posts
    72

    Re: How Can I Handle The Menu Screen.

    Hello lfd,

    thanx for ur reply.

    but i want to detect that this menu bar or navigation pane is active or not. It is my requirement . so pls if it is possible then pls tell me .

    again thanx for ur reply.

    With Warm Regards,
    ashutosh.

  6. #6
    Regular Contributor
    Join Date
    May 2006
    Posts
    72

    Re: How Can I Handle The Menu Screen.

    Hello lfd,

    again thanx for ur reply. but that time i was the wrong way. i did not need for handle that navigation tab. i have solve my problem by "capturing and releasing the key "

    thanx for ur reply.

    again thanx

    regards
    ashutosh.

Similar Threads

  1. Replies: 2
    Last Post: 2007-11-10, 13:19
  2. slide menu in j2me
    By afka in forum Mobile Java General
    Replies: 4
    Last Post: 2006-09-04, 09:10
  3. Nokia 6680 - Startup Screen Menu
    By numbnuts in forum General Development Questions
    Replies: 0
    Last Post: 2005-10-02, 15:51
  4. UI: Full Screen Mode
    By GENERAL_INFO in forum Symbian User Interface
    Replies: 3
    Last Post: 2004-11-22, 06:27
  5. Menu screen
    By sunilpai123 in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2004-05-24, 09:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×