Categories: S60 | Symbian C++ | UI | Code Examples
This page was last modified 08:46, 22 November 2007.
Changing Status pane text and icon
From Forum Nokia Wiki
The status pane icon and title are a good way of showing the current status inside the application. The following code samples illustrate how you can change the status pane icon and text on run time to help users determine the current status of the application.
void ChangePaneIconL(const TDesC& aIconFile, TInt aIndex, TInt aMask) { CEikStatusPane* sp = ((CAknAppUi*)iEikonEnv->EikAppUi())->StatusPane(); if (sp) { CAknContextPane* ContextPane = (CAknContextPane*) sp->ControlL(TUid::Uid(EEikStatusPaneUidContext)); if (ContextPane) { ContextPane->SetPictureFromFileL(aIconFile,aIndex,aMask); } } } void ChangePaneIconDefaultL(void) { CEikStatusPane* sp = ((CAknAppUi*)iEikonEnv->EikAppUi())->StatusPane(); if (sp) { CAknContextPane* ContextPane = (CAknContextPane*) sp->ControlL(TUid::Uid(EEikStatusPaneUidContext)); if(ContextPane) { ContextPane->SetPictureToDefaultL(); } } }
ChangePaneIconL() function is used to change the current icon. The aIconFile can be either an MBM or MIF file and should include the full file name (i.e. drive+path+name+extension). aIndex is the index to the icon image and aMask is the index to the mask image used with the image.
ChangePaneIconDefaultL() function is used to change the default icon back.
void ChangePaneTextL(const TDesC& aText) { CEikStatusPane* sp = ((CAknAppUi*)iEikonEnv->EikAppUi())->StatusPane(); if (sp) { CAknTitlePane* TitlePane = STATIC_CAST(CAknTitlePane*, sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle))); if (TitlePane) { TitlePane->SetTextL(aText); } } } void ChangePaneTextDefaultL(void) { CEikStatusPane* sp = ((CAknAppUi*)iEikonEnv->EikAppUi())->StatusPane(); if (sp) { CAknTitlePane* TitlePane = STATIC_CAST(CAknTitlePane*, sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle))); if (TitlePane) { TitlePane->SetTextToDefaultL(); } } }
ChangePaneTextL() function is used to change the status pane text and the ChangePaneTextDefaultL() function is used to change the status pane text back to its default text.
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| AddTabL into CAknTabGroup | stenlik | General Symbian C++ | 2 | 2007-04-16 21:40 |
| Internet access sign | aisaxi | Mobile Java Networking & Messaging & Security | 1 | 2007-10-22 07:52 |
| does anybody have expirense with CAknTabGroup? | donDonald | Symbian User Interface | 1 | 2005-11-18 04:22 |
| Is it possible to change theme programmatically on S60 3rd addition? | jain_0882 | Symbian Media (Graphics & Sounds) | 2 | 2008-05-06 10:39 |
| Svg image as the application background | hubbabubba | General Symbian C++ | 3 | 2006-07-04 11:24 |
