×
Namespaces

Variants
Actions
Revision as of 10:21, 20 July 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Changing Title Pane Text

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: vasant21 (10 May 2007)
Last edited: hamishwillee (20 Jul 2012)

The code below shows how to change the Title Pane Text.

Headers required:

#include <akntitle.h>  // CAknTitlePane 
#include <eikspane.h> // CEikStatusPane ,CEikStatusPaneBase

Library required:

LIBRARY avkon.lib  //CAknTitlePane 
LIBRARY eikcoctl.lib //CEikStatusPane ,CEikStatusPaneBase

Source file:

TUid titlePaneUid;
 
titlePaneUid.iUid = EEikStatusPaneUidTitle;
 
// calling CAknAppUi::StatusPane() which returns CEikStatusPane* //
CEikStatusPane* statusPane = StatusPane();
 
CEikStatusPaneBase::TPaneCapabilities subPane = statusPane->PaneCapabilities(titlePaneUid);
 
// if title pane is accessible //
 
if ( subPane.IsPresent() && subPane.IsAppOwned() )
{
 
CAknTitlePane* titlePane =
(CAknTitlePane*) statusPane->ControlL(titlePaneUid);
 
// read the title text from the resource file
 
HBufC* titleText = StringLoader::LoadLC(R_TITLE_TEXT);
 
// set the title pane's text
 
titlePane->SetTextL(*titleText);
 
CleanupStack::PopAndDestroy(titleText);
}
This page was last modified on 20 July 2012, at 10:21.
49 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.

×