Namespaces

Variants
Actions

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 over the next few weeks. Thanks for all your past and future contributions.

Set text on navigation pane

From Wiki
Jump to: navigation, search
Article Metadata
Article
Created: giridharn (22 May 2007)
Last edited: hamishwillee (26 Jul 2012)

This bit of code can be used to edit your View's Navi Pane Text, even if it was made with the Carbide designer. It should be placed in the *View file and does NOT need ANY KIND OF modifications to make it fit your Navi Pane Text (aka there is no need to paste in the Navi Panes name anywhere).

There are used following header files:

#include <aknnavi.h>
#include <aknnavide.h>
#include <eikspane.h>
#include <aknnavilabel.h>
CAknNavigationControlContainer *iNaviContainer;
CAknNavigationDecorator* iNaviLabelDecorator;
 
CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();
iNaviContainer = (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
iNaviLabelDecorator = iNaviContainer->CreateNavigationLabelL();
 
 
static_cast<CAknNaviLabel*>(iNaviLabelDecorator->DecoratedControl())->SetTextL(_L("Hellotext"));
iNaviContainer->PushL(*iNaviLabelDecorator);


Notes when using this with Carbide

This is unreliable when used in conjunction with Carbide-Generated UI in two facets: x) the text pops up on all forms x) screen rotation does all kinds of weird stuff

This page was last modified on 26 July 2012, at 06:30.
75 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.

×