Discussion Board

Results 1 to 2 of 2
  1. #1
    Super Contributor
    Join Date
    Mar 2003

    How do you use the Navigation Pane?

    I want to put a line of text into the navi-pane (and update it) but cannot work out how. The documentation implies that CAknNavigationControlContainer and CAknNavigationDecorator are used but there is no explanation and no examples.

    Can anybody help, please

    Posted by Scott Morris, scott.morris@teleca.com
    on January 15, 2002 at 13:28

  2. #2
    Super Contributor
    Join Date
    Mar 2003

    RE: How do you use the Navigation Pane?

    Posted by Soumya Rao, sr1706@hotmail.com
    on February 02, 2002 at 10:38

    Hi Scott,

    Even tho' it's a bit late, if you still have the problem, try using this piece of code:

    In the AppUI.cpp file put the following code:

    void CGUICtrlsAppUi::ConstructL()

    // Show tabs for main views from resources
    CEikStatusPane* sp = StatusPane();

    // Fetch pointer to the default navi pane control
    iNaviPane = (CAknNavigationControlContainer*)sp->ControlL(

    // Tabgroup has been read from resource and it were pushed to the navi pane.
    // Get pointer to the navigation decorator with the ResourceDecorator() function.
    // Application owns the decorator and it has responsibility to delete the object.
    iDecoratedTabGroup = iNaviPane->ResourceDecorator();
    if (iDecoratedTabGroup)
    iTabGroup = (CAknTabGroup*) iDecoratedTabGroup->DecoratedControl();

    // further code to construct the views follows here::

    CGUICtrlsView* view1 = new (ELeave) CGUICtrlsView;

    CleanupStack::PushL( view1 );
    AddViewL( view1 ); // transfer ownership to CAknViewAppUi
    CleanupStack::Pop(); // view1

    CGUICtrlsView2* view2 = new (ELeave) CGUICtrlsView2;

    CleanupStack::PushL( view2 );
    AddViewL( view2 ); // transfer ownership to CAknViewAppUi
    CleanupStack::Pop(); // view2



    Also to handle he key events on the tabbed screen:

    use the following:

    TKeyResponse CGUICtrlsAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
    if ( iTabGroup == NULL )
    return EKeyWasNotConsumed;

    // setting the active tab and the count
    TInt active = iTabGroup->ActiveTabIndex();
    TInt count = iTabGroup->TabCount();

    switch ( aKeyEvent.iCode )
    case EKeyLeftArrow:

    iEikonEnv->InfoMsg(_L("Left key "));

    if ( active > 0 )
    iTabGroup->SetActiveTabByIndex( active );

    //.... further handling code

    Hope this helps.


Posting Permissions

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