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.

Inserting text or an icon on the navi pane of a Symbian app

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Created: User:Technical writer 2 (19 Oct 2006)
Last edited: lpvalente (11 Jun 2014)


Inserting text or an icon on the navi pane of an application


Symbian applications can set custom icons or texts to be displayed on the navi pane while their application is in foreground.


First, a reference to the status pane is retrieved. Next, the reference of the navi pane is obtained from the status pane. The application then has to create a text-based Navi decorator object using the CAknNavigationDecorator class. Finally, the decorator object needs to be pushed onto the navi pane so that it becomes visible.

CAknNavigationControlContainer* iNaviPane = 0;
CAknNavigationDecorator* iNaviDecorator = 0;
//Get the reference of the status pane
CEikStatusPane *statusPane = iEikonEnv->AppUiFactory()->StatusPane();
if ( statusPane )
//Get the reference of the navi pane
TUid::Uid(EEikStatusPaneUidNavi)) );
//Create a Navi decorator object
iNaviDecorator= iNaviPane->CreateEditorIndicatorContainerL();
//Get the reference of the indicator container inside the NaviDecorator
CAknIndicatorContainer* indiContainer =
if ( indiContainer && CEikStatusPaneBase::Current() )
TBuf<32> msgSize;
msgSize.Append(_L("Test")); // Text to be displayed
TUid::Uid( EAknNaviPaneEditorIndicatorMessageLength ), msgSize );
TUid::Uid( EAknNaviPaneEditorIndicatorMessageLength ),
//Push the object onto the navi pane.
iNaviPane->PushL( *iNaviDecorator );

Similarly, the code snippet to display an icon on the navi pane is as follows:

CFbsBitmap* bitmap = NULL;
CFbsBitmap* mask = NULL;
CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
CAknNavigationControlContainer* naviPane = (CAknNavigationControlContainer*)statusPane->ControlL(
// Create an icon
AknIconUtils::CreateIconLC (bitmap, mask, KIconFile,
EMbmCarsvgCircle, EMbmCarsvgCircle_mask); //KIconFile is the .mif file
TSize size(30,30);
AknIconUtils::SetSize(bitmap, size); // Sets the size of the extracted image
//Create a Navi Decorator encapsulation for the image.
CAknNavigationDecorator* naviDecorator =
naviPane->CreateNavigationImageL(bitmap, mask);
//Push the image onto the navi pane.

Required include files and libraries:

#include <aknnavi.h>               // for CAknNavigationControlContainer
#include <eikspane.h> // for CEikStatusPane
#include <aknnavide.h> // for CAknNavigationDecorator
#include <akniconutils.h> // for AknIconUtils
#include <aknindicatorcontainer.h> // for CAknIndicatorContainer
LIBRARY aknicon.lib
LIBRARY fbscli.lib
LIBRARY avkon.lib

Note: The icons or text stay on the navi pane as long as the application is in foreground but they do not affect the idle screen of the device.

This page was last modified on 11 June 2014, at 17:15.
33 page views in the last 30 days.