Hi all,
I am using a plain text editor. I have enabled for skin support in my APPUI constructL [BaseConstructL( EAknEnableSkin );]. Also i have added code for skin support in my container. I get the background of the main pane as that of the skin in the editor. But my font color comes to be green. But i observe that in the applications available on phone (say message editor), the font color is white. I want to know how i can set the font of my editor exactly like the skin font. I am giving my code for reference.
Code:RESOURCE EDWIN r_my_container_edit1 { maxlength = 500; flags = EEikEdwinReadOnly ; default_case = EAknEditorTextCase; allowed_case_modes = EAknEditorAllCaseModes; numeric_keymap = EAknEditorStandardNumberModeKeymap; default_input_mode = EAknEditorTextInputMode; allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode | EAknEditorSecretAlphaInputMode | EAknEditorKatakanaInputMode | EAknEditorFullWidthTextInputMode | EAknEditorFullWidthNumericInputMode | EAknEditorFullWidthKatakanaInputMode | EAknEditorHiraganaKanjiInputMode | EAknEditorHalfWidthTextInputMode; special_character_table = 0; avkon_flags = EAknEditorFlagEnableScrollBars; lines = 100; } void CTestContainer::ConstructL( const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver ) { if ( aParent == NULL ) { CreateWindowL(); } else { SetContainerWindowL( *aParent ); } iFocusControl = NULL; iCommandObserver = aCommandObserver; InitializeControlsL(); SetRect( aRect ); ActivateL(); iEdit1->SetCursorPosL(0,EFalse); iBgContext = CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgAreaMain,aRect,ETrue); } void CTestContainer::InitializeControlsL() { iEdit1 = new ( ELeave ) CEikEdwin; iEdit1->SetContainerWindowL( *this ); { TResourceReader reader; iEikonEnv->CreateResourceReaderLC( reader, R_MY_CONTAINER_EDIT1 ); iEdit1->ConstructFromResourceL( reader ); CleanupStack::PopAndDestroy(); // reader internal state } HBufC* text = StringLoader::LoadLC( R_TEST_CONTAINER_EDIT1_2 ); iEdit1->SetTextL( text ); CleanupStack::PopAndDestroy( text ); } void CTestContainer::Draw( const TRect& aRect ) const { CWindowGc& gc = SystemGc(); gc.Clear( aRect ); // Redraw the background using the default skin MAknsSkinInstance* skin = AknsUtils::SkinInstance(); MAknsControlContext* cc = AknsDrawUtils::ControlContext( this ); AknsDrawUtils::Background( skin, cc, this, gc, aRect ); } TTypeUid::Ptr CTestContainer::MopSupplyObject(TTypeUid aId) { if (iBgContext ) { return MAknsControlContext::SupplyMopObject( aId, iBgContext ); } return CCoeControl::MopSupplyObject(aId); }



