×
Namespaces

Variants
Actions

Showing count in the navi pane on Symbian

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Nokia N95
Compatibility
Platform(s): S60 3rd Edition, FP1
Article
Keywords: MAknEditingStateIndicator
Created: User:Technical writer 1 (02 Oct 2008)
Last edited: hamishwillee (14 Jun 2012)

Contents

Overview

The remaining text count can be shown in the navi pane in a similar way as in the native SMS editor using MAknEditingStateIndicator, which can be accessed through the Eikon environment.

This snippet can be self-signed.

Preconditions

This code snippet requires application framework because MAknEditingStateIndicator is accessed through the Eikon environment variable.

MMP file

The following library is required:

LIBRARY avkon.lib

Header files

#include <aknindicatorcontainer.h> 
#include <AknEditStateIndicator.h>


Source file

 void UpdateCharacterCountL(const TInt& aCount)
{
MAknEditingStateIndicator *ei = CAknEnv::Static()->EditingStateIndicator();
if( ei)
{
TBuf<255> msgSize;
msgSize.Num(aCount);
CAknIndicatorContainer *ic = ei->IndicatorContainer();
ic->SetIndicatorValueL(TUid::Uid( EAknNaviPaneEditorIndicatorMessageLength ), msgSize);
ic->SetIndicatorState(TUid::Uid( EAknNaviPaneEditorIndicatorMessageLength ),EAknIndicatorStateOn);
}
}
This page was last modified on 14 June 2012, at 04:11.
46 page views in the last 30 days.