Showing count in the navi pane on Symbian
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);
}
}

